getMessageReadReceipts
Introduction
Load the list of reading receipt for messages.
This method only works with Ultimate Edition, you can find the pricing plan here.
Only supports group messages temporarily. The IDs in messageIDList
must be in the same group.
Specifying a group type for which to support message read receipts: Log in to the IM console, select Feature Configuration > Login and Message > Group Message Read Receipts.
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
messageIDList | string[] | yes | The list of message IDs to query for. |
Returned template
V2TimValueCallback<V2TimMessageReceipt[]>
{
code : number
desc : string
data : V2TimMessageReceipt[]
}
Return value details
name | type | description |
---|---|---|
code | number | Request result: Error codes. 0 means success. |
desc | string | The description of the error. It will be empty if success. |
data | V2TimMessageReceipt[] | The list of results. |
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const getMessageReadReceipts = await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.getMessageReadReceipts([]);
if (getMessageReadReceipts.code === 0) {
getMessageReadReceipts.data?.forEach((element) => {
element.groupID;
element.msgID;
element.readCount;
element.timestamp;
element.unreadCount;
element.userID;
});
}