SDKsWASM
Get conversations by ID
Get conversations in batches by conversationID with the WASM SDK.
When you already have a set of conversationID values, use getMultipleConversation() to retrieve the latest conversation snapshots in one call.
const { data: conversations } =
await openimsdk.getMultipleConversation(conversationIDs);
const byID = new Map(
conversations.map((item) => [item.conversationID, item]),
);The successful Promise returns ConversationItem[]. See Get the conversation list for field descriptions.
Treat an ID with no corresponding result as a missing record. Do not assume that response items correspond positionally to request items. This query does not trigger a conversation event.
Was this page helpful?