SDKsReact NativeEnterprise
Load newer messages
Load history messages forward in time from an anchor message using the OpenIM React Native SDK.
Page forward in time to retrieve newer messages following a designated anchor message:
Use this method when a user jumps to an older historical message and scrolls downward to load subsequent conversation records.
const page = await OpenIMSDK.getAdvancedHistoryMessageListReverse({
conversationID,
startClientMsgID: anchorMessage.clientMsgID,
count: 30,
viewType: ViewType.History,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Target conversation ID. |
startClientMsgID | string | Yes | Anchor client message ID from which forward pagination begins. |
count | number | Yes | Maximum number of messages to fetch in this batch. |
viewType | ViewType | Yes | Retrieval context; pass ViewType.History when browsing standard chat logs. |
Return value
A resolved Promise returns an AdvancedGetMessageResult object:
messageList(MessageItem[]): Array of newer messages retrieved for the current page.isEnd(boolean): Indicates whether forward pagination has reached the newest message in the conversation;truemeans no newer messages exist.- Deduplicate and merge retrieved records into the active conversation view using
clientMsgID. For full response structures, see Load older messages.
Was this page helpful?