Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

Get group message readers

Paginate read or unread member status for a specific group message.

Copy

Locates the target group message using conversationID and clientMsgID.

Code example

import sdk, { GetGroupMessageReaderListReq, GetGroupMessageReaderListResp } from '@openimsdk/imsdk';

const request: GetGroupMessageReaderListReq = {
  conversationID: conversationID,
  clientMsgID: message.clientMsgID,
  filter: 0,
  offset: 0,
  count: 50,
};
const response: GetGroupMessageReaderListResp = await sdk.getGroupMessageReaderList(request);
const readers = response.readers;

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesTarget conversation identifier.
clientMsgIDstringYesClient message identifier of the target group message.
filternumberYes0 for read members; 1 for unread members.
offsetnumberYesStarting offset index for pagination.
countnumberYesNumber of records to return.

Return value

Returns a Promise resolving to GetGroupMessageReaderListResp:

PropertyTypeDescription
readersGroupMessageReader[]Array of member items matching the filter.

State changes after the call

Pass filter: 0 to query members who have read the message, or 1 for unread members. Clients deduplicate items by groupID:userID. This method uses offset-based pagination; when the returned item count is less than count, the end of the list has been reached. This is a read-only query that does not fire receipt events. To report group message read receipts, see Send group message read receipts.