Browse SDKs · React Native
Platform
SDKsReact Native

Get conversations by ID

Batch retrieve conversation details by conversationID using the OpenIM React Native SDK.

Copy

When holding an array of conversation IDs, retrieve their latest conversation items in a batch with getMultipleConversation():

const conversations = await OpenIMSDK.getMultipleConversation(conversationIDList);

Parameters

ParameterTypeRequiredDescription
conversationIDListstring[]YesArray of conversation IDs to retrieve.

Return value

Resolves to an array of ConversationItem[]. The returned array length may be smaller than the input list if certain conversation records do not exist in the local SQLite database. Reconcile the returned conversation records into your application state keyed by conversationID. For detailed property definitions, see Retrieve conversation list.