conversations.markAsRead()
This method allows you to mark a conversation as read when the conversation ID is provided. Sender of messages in such conversations will receive updates when this happens so that they may update their UI.
Every incoming message is automatically marked as DELIVERED
. However, marking as READ
depends on the UI of the application, and should be called when user actually sees the message.
Definition
client.conversations.markAsRead(conversationId: string|Object):Promise<Error>
Parameters
Parameter | Type | Description |
---|---|---|
conversationId | string |Object | A string containing a conversation ID or a Conversation object |
Returns
An error will be thrown if the conversation couldn't be marked as read.
Example
await client.conversations.markAsRead({conversationId: 'some-conversation-id'})