Mark all conversations as read
OpenIM uni-app / uni-app x SDK guide for Mark all conversations as read.
markAllConversationMessageAsRead() clears the unread state of all conversations currently found for the signed-in account.
import { markAllConversationMessageAsRead } from '@/uni_modules/unix-openim-sdk'
await markAllConversationMessageAsRead()Because this is a wide-scope state change, ask for confirmation. Promise success means that SDK Core finished the operation for the conversations it found. It does not mean that conversation events have arrived or that every other client's UI already synchronized.
Do not merely set the badge to zero. Merge each onConversationChanged item by conversationID and replace the total through onTotalUnreadMessageCountChanged. See Get the conversation list and Get the total unread count. Requery both snapshots if new unread messages may have arrived concurrently.
This operation does not delete messages and does not change a conversation's message-reception option or guarantee message-level read receipts.
Was this page helpful?