Multi-Device Synchronization of Read Status
Multi-Device Read Status Synchronization
Call sendSyncReadStatusMessage to synchronize message read status across multiple clients.
Interface
RongIMLib.sendSyncReadStatusMessage(conversation, timestamp)
#### Parameter Description
| Parameter | Type | Required | Description |
|:--- |:--- |:--- |:--- |
| conversation | [IConversationOption] | Yes | Target conversation |
| timestamp | number | Yes | Synchronization timestamp, obtainable from the message's sendTime |
#### Sample Code
```js
const conversation = {
conversationType: RongIMLib.ConversationType.PRIVATE,
targetId: "<Target User ID>",
channelId: ""
};
const timestamp = Date.now(); // The sendTime of the read message
// Send read status synchronization
const syncReadStatusRes = await RongIMLib.sendSyncReadStatusMessage(conversation, timestamp);
console.info('Multi-device read status sync:', syncReadStatusRes);
<!-- links -->
[IConversationOption]: https://doc.rongcloud.cn/apidoc/im-web/latest/zh_CN/modules.html#IConversationOption