Browse SDKs · uni-app / uni-app x
Platform
SDKsuni-app / uni-app xEnterprise

Get group message readers

Query paginated lists of group members who have read or not read a specific message.

Copy

Tracking member-level group read status is a Commercial Edition capability. Query group members who have either read or not read a specific message using pagination.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesTarget group conversation ID.
clientMsgIDstringYesThe clientMsgID of the message being queried.
filterOpenIMGroupMessageReaderFilterYesUse OpenIMGroupMessageReaderFilterRead for readers, or OpenIMGroupMessageReaderFilterUnread for unread members.
offsetnumberYesPagination offset; supply 0 for the first page.
countnumberYesMaximum number of members to fetch in this page.

Code example

import {
  OpenIMGroupMessageReaderFilterRead,
  getGroupMessageReaderList,
} from '@/uni_modules/unix-openim-sdk'

const clientMsgID = message.clientMsgID
if (clientMsgID == null) return

const result = await getGroupMessageReaderList({
  conversationID,
  clientMsgID,
  filter: OpenIMGroupMessageReaderFilterRead,
  offset: 0,
  count: 50,
})

const readers = result?.readers ?? []

Return value

The Promise resolves with an OpenIMGetGroupMessageReaderListResult | null object. Retrieved member records are available in readers (OpenIMGroupMemberItem[]). Deduplicate and merge members using groupID:userID. When the returned array contains fewer items than count, the end of the member list has been reached.

State changes after the call

This call retrieves a point-in-time snapshot and does not emit receipt events. To stay updated with incoming read receipts, listen to the read receipt events documented in Send group read receipts.