Mark all conversations as read
Clear the unread counts of all currently unread conversations with the WASM SDK.
When the user explicitly chooses a “mark all as read” action, call markAllConversationMessageAsRead() to process every unread conversation currently recorded in the local SDK:
await openimsdk.markAllConversationMessageAsRead();When the Promise resolves, the SDK has finished processing the unread conversations found for this operation. It does not mean that the related conversation events have already arrived or that every other client has finished updating its UI.
When OnConversationChanged arrives, use conversationID to update each matching conversation, and use OnTotalUnreadMessageCountChanged to update the aggregate unread count. See Get the conversation list and Track the total unread count for the complete listeners. Query both values again when the latest state must be confirmed.
Was this page helpful?