The Conversation namespace includes methods that give you access to Conversation and ConversationMessage objects.
Conversation objects represent interaction pairs between Subscribers and Addresses. Each Conversation object has the following properties:
Here is an example of a Conversation object:
ConversationMessage objects represent the specific interactions that have taken place in the Conversation:
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.kind: The kind of the conversation message.Here is an example of a ConversationMessage object:
Promise<{ data: Conversation[], hasNext, hasPrev }> -Returns a list of Conversation objects.
Promise<{ data: Conversation[], hasNext, hasPrev }>
options): Promise<{ data: ConversationMessage[], hasNext, hasPrev }>Returns a list of ConversationMessage objects inside a Conversation with an Address ID.
Promise<{ data: ConversationMessage[], hasNext, hasPrev }>
options): Promise<{ data: ConversationMessage[], hasNext, hasPrev }>Returns a list of ConversationMessage objects without filtering by Address ID.
Promise<{ data: ConversationMessage[], hasNext, hasPrev }>
Promise<void>Subscribe to receive new ConversationMessage objects as they happen.
Promise<void>
options): Promise<Conversation>Sends a Chat Message to the Conversation. This is the same function as chat.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 chat.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 sending a message.