get Remote History Messages
Fetches historical messages before a specified time from the server.
Unlike getHistoryMessages, this interface pulls data from the RCserver. After pulling messages from the server, the client performs deduplication and returns the deduplicated data. This is typically used to fetch historical messages after switching to a new device. It is recommended to first use getHistoryMessages to fetch historical messages from the local database. If no historical messages are found in the local database, use this interface to fetch server historical messages, passing the timestamp of the earliest message in the local database.Note: 1. This feature requires enabling the historical message cloud storage function in the RCdeveloper console. 2. If the local database already contains the messages to be fetched, this interface will not return any data.
Parameters
The conversation type.
The target conversation ID. Depending on the conversationType, this could be a user ID, discussion group ID, or group ID.
Fetches messages starting from this timestamp. Specifically, the sentTime in the message getSentTime. If there are no messages in the local database, pass 0 for the first call; otherwise, pass the sentTime of the earliest message to fetch the latest count messages.
The number of messages to fetch, 0 < count <= 20
.
The callback for fetching historical messages, ordered from newest to oldest.
Fetches remote historical messages for a specified conversation.
This feature requires enabling the message cloud storage feature in the RongCloud Developer Console.Note: Chatrooms are not supported!
Parameters
The type of conversation. Chatrooms are not supported.
The conversation ID. Depending on the conversationType, this could be a user ID, discussion group ID, or group ID.
Configurable parameters RemoteHistoryMsgOption
Callback for retrieving historical messages, ordered from newest to oldest.