Function useSendMessage

This hook sends a new message into a conversation

  • Parameters

    • Optionaloptions: 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>>
        • Type Parameters

          • T = string

          Parameters

          • conversation: CachedConversation
          • content: T
          • OptionalcontentType: ContentTypeId
          • OptionalsendOptions: Omit<SendOptions, "contentType">

          Returns Promise<undefined | DecodedMessage<any>>