Browse SDKs · React Native
Platform
SDKsReact NativeEnterprise

Load newer messages

Load history messages forward in time from an anchor message using the OpenIM React Native SDK.

Copy

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

ParameterTypeRequiredDescription
conversationIDstringYesTarget conversation ID.
startClientMsgIDstringYesAnchor client message ID from which forward pagination begins.
countnumberYesMaximum number of messages to fetch in this batch.
viewTypeViewTypeYesRetrieval 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; true means no newer messages exist.
  • Deduplicate and merge retrieved records into the active conversation view using clientMsgID. For full response structures, see Load older messages.