Mark conversation as read
Mark all unread messages in a conversation as read using the OpenIM React Native SDK.
When the user enters a chat screen to read incoming messages, mark all unread messages in the conversation as read:
await OpenIMSDK.markConversationMessageAsRead(conversationID);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Target conversation ID to mark as read. |
Return value
A resolved Promise confirms that the unread message counter for the current account in this conversation has been reset to zero.
The reset triggers the OnConversationChanged and OnTotalUnreadMessageCountChanged events. Locate the target conversation using conversationID and update its unreadCount to 0. In group chats, this method resets only the current account's local unread counter; to broadcast per-message read receipts to other group members, see Send group read receipts. For event handling, see Retrieve conversation list.
Was this page helpful?