- useSendMessage(options?): {
error: null | Error;
isLoading: boolean;
sendMessage: (<T>(conversation: CachedConversation, content: T, contentType?: ContentTypeId, sendOptions?: Omit<SendOptions, "contentType">) => Promise<undefined | DecodedMessage<any>>);
} Parameters
Optional
options: UseSendMessageOptions
Returns {
error: null | Error;
isLoading: boolean;
sendMessage: (<T>(conversation: CachedConversation, content: T, contentType?: ContentTypeId, sendOptions?: Omit<SendOptions, "contentType">) => Promise<undefined | DecodedMessage<any>>);
}
error: null | Error
isLoading: boolean
sendMessage: (<T>(conversation: CachedConversation, content: T, contentType?: ContentTypeId, sendOptions?: Omit<SendOptions, "contentType">) => Promise<undefined | DecodedMessage<any>>)
- <T>(conversation, content, contentType?, sendOptions?): Promise<undefined | DecodedMessage<any>>
Parameters
- conversation: CachedConversation
- content: T
Optional
contentType: ContentTypeIdOptional
sendOptions: Omit<SendOptions, "contentType">
Returns Promise<undefined | DecodedMessage<any>>
This hook sends a new message into a conversation