SDKsuni-appEnterprise
Report group messages as read
OpenIM uni-app / uni-app x SDK guide for Report group messages as read.
import { off, onRecvGroupReadReceipt, sendGroupMessageReadReceipt } from '@/uni_modules/unix-openim-sdk'
const receiptSubscription = onRecvGroupReadReceipt((payload) => {
mergeValidatedGroupReadReceipt(payload)
})
await sendGroupMessageReadReceipt({ conversationID, clientMsgIDs: visibleUnreadMessageIDs })
function removeGroupReadReceiptListener() {
off(receiptSubscription)
}Both APIs are Commercial. All message IDs in one request must belong to the target group conversation. Promise success means the server accepted the report; it does not update the conversation unread count, which remains the responsibility of markConversationMessageAsRead().
This page owns raw JSON event onRecvGroupReadReceipt. Validate JSON and merge counts/member data by conversationID + clientMsgID. Remove the subscription on logout or account change. Request completion, event delivery, and the snapshot returned by Get group message readers are independent phases.
Was this page helpful?