Browse SDKs · uni-app / uni-app x
SDKsuni-appEnterprise

Get conversations in a group

OpenIM uni-app / uni-app x SDK guide for Get conversations in a group.

Copy

getConversationGroupInfoWithConversations() Commercial returns group metadata, the total conversation count, and one page of conversations.

Parameters

ParameterTypeRequiredDescription
conversationGroupIDstringYesGroup to query.
pagination.pageNumbernumberYesPage number; this contract example starts at 1.
pagination.showNumbernumberYesConversations 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:

FieldTypeDescription
conversationGroupOpenIMConversationGroupItem or nullGroup metadata. Do not continue paging if it is null.
ConversationTotalnumber or null (optional)Total conversations. The initial uppercase C is part of the contract.
conversationsOpenIMConversationItem[]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.