SDKsWASMEnterprise
Get conversations in a group
Page through a conversation group and its conversation details.
Use getConversationGroupInfoWithConversations() to retrieve one conversation group together with one page of its conversation details.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationGroupID | string | Yes | Conversation group ID to query. |
pagination.pageNumber | number | Yes | Page number, starting at 1. |
pagination.showNumber | number | Yes | Number of conversations per page. |
const { data } = await openimsdk.getConversationGroupInfoWithConversations({
conversationGroupID,
pagination: {
pageNumber: 1,
showNumber: 20,
},
});
renderConversationGroup(data.group, data.conversationElems, data.conversationTotal);Return result
| Field | Type | Description |
|---|---|---|
group | ConversationGroup | Current conversation group details. |
conversationTotal | number | Total number of conversations in the group. |
conversationElems | ConversationItem[] | Conversation details for the current page. |
See Get conversation groups for group fields and Get the conversation list for conversationElems fields. Determine the end of pagination from conversationTotal and the number of conversations already loaded.
This query does not trigger group events. Conversations in the group can change during pagination. If the page must show the latest data after pagination finishes, query again and use the latest result. See Conversation group overview for handling the related events.
Was this page helpful?