The Chat namespace includes methods that allows you to send and receive chat messages.
ConversationChatMessage objectConversationChatMessage objects represent the specific interactions that have taken place in the Chat:
id: A unique identifier for the conversation message.conversation_id: A unique identifier of the parent conversation.user_id: A unique identifier for the subscriber.ts: The timestamp, in Unix Epoch, when the message was created.details: Additional metadata associated with the conversation.type: The type of the conversation message.subtype: The subtype of the conversation message.Here is an example of a ConversationChatMessage object:
options): Promise<{ data: ConversationChatMessage[], hasNext, hasPrev, nextPage(), prevPage() }>Returns the list of chat messages for a given addressId.
Promise<{ data: Address[], hasNext, hasPrev, nextPage(), prevPage() }>
options): {cancel()}Returns a list of Addresses.
An object will be returned with a cancel() function which can be used to unsubscribe to the event.
options): Promise<Conversation>Send a Chat Message to a given Address ID. If no Conversation exists with that Address ID, one will be created.
This is the same function as conversation.sendMessage.
options): Promise<JoinConversationResponse>Joins a conversation given an address without having to send a message. Does nothing if you
were already joined to the conversation. This is the same function as conversation.join.
You automatically join a conversation when you send the first message to an address. The join
method allows you to join a conversation without first sending a message.