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

Get joined groups

Retrieve the complete list of groups joined by the authenticated user.

Copy

When the authenticated user belongs to a moderate number of groups, invoke getJoinedGroupList() without parameters to load the joined group collection directly.

Code example

import { getJoinedGroupList } from '@/uni_modules/unix-openim-sdk'

const result = await getJoinedGroupList()
const groups = result != null ? result.groups : []

Return value

The Promise resolves with an OpenIMGroupListResult | null object containing an array of OpenIMGroupItem elements in groups. Maintain your local group cache by matching groupID. For primary group fields, see Group overview.

State changes after the call

For accounts with large group rosters, use Get joined groups with pagination to avoid loading all records into memory at once. This query retrieves an initial snapshot without modifying data or triggering events; subsequent additions, departures, and profile changes are delivered via events documented in Group overview.