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

Get joined groups by page

OpenIM uni-app / uni-app x SDK guide for Get joined groups by page.

Copy

Use getJoinedGroupListPage() for accounts with many joined groups.

Parameters

ParameterTypeRequiredDescription
offsetnumberYesOffset; use 0 for the first page.
countnumberYesNumber of groups to read.
import { getJoinedGroupListPage } from '@/uni_modules/unix-openim-sdk'

const result = await getJoinedGroupListPage({ offset: 0, count: 100 })
appendGroups(result?.groups ?? [])

Return result

The Promise resolves directly to OpenIMGroupListResult or null; groups contains the current page. Increase the offset until a page contains fewer than count items.

Group profile fields

FieldDescription
groupIDStable group identifier.
groupName, faceURLGroup name and avatar snapshot.
notification, introductionAnnouncement and introduction.
ownerUserID, creatorUserID, createTimeOwner, creator, and creation time.
memberCount, status, groupTypeMember-count, group-state, and type snapshot.
needVerificationJoin-verification policy.
lookMemberInfo, applyMemberFriendMember-profile and friend-application policy.
notificationUpdateTime, notificationUserIDLatest announcement update metadata.
exApplication extension string.
attachedInfo EnterpriseCommercial attachment data; parse only a confirmed contract.

Member count and permission fields are snapshots and do not replace member pagination or server authorization. See Group overview for events and the model.

Group events can move page boundaries. Merge pages into a map keyed by groupID, rebuild from offset 0 after App restoration/synchronization or group add/delete events, and stop old-account page writes during account switching.

Use the first page to replace the current account's group snapshot and later pages to merge by groupID. Do not retain old-account group objects after switching users. Group names and member counts can change while paging, so calculate visible ordering only after merging the latest snapshot and events.