SDKsuni-appEnterprise
Get conversations in a group
OpenIM uni-app / uni-app x SDK guide for Get conversations in a group.
getConversationGroupInfoWithConversations() Commercial returns group metadata, the total conversation count, and one page of conversations.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationGroupID | string | Yes | Group to query. |
pagination.pageNumber | number | Yes | Page number; this contract example starts at 1. |
pagination.showNumber | number | Yes | Conversations requested per page. |
import { getConversationGroupInfoWithConversations } from '@/uni_modules/unix-openim-sdk'
const result = await getConversationGroupInfoWithConversations({
conversationGroupID: groupID,
pagination: { pageNumber: 1, showNumber: 100 },
})Return result
The Promise resolves directly to OpenIMGetConversationGroupInfoWithConversationsResult or null:
| Field | Type | Description |
|---|---|---|
conversationGroup | OpenIMConversationGroupItem or null | Group metadata. Do not continue paging if it is null. |
ConversationTotal | number or null (optional) | Total conversations. The initial uppercase C is part of the contract. |
conversations | OpenIMConversationItem[] | Current page. |
Membership can change while pages load. Deduplicate by conversationID, and rebuild pagination on the first page or after a membership event. Do not replace ConversationTotal with the current array length.
Was this page helpful?