SDKsuni-app / uni-app x
Get user group membership
Determine which users from a specified candidate list remain active members of a group.
Invoke getUsersInGroup() to check which users from a candidate list currently belong to a specified group without loading full member profile objects.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group identifier. |
userIDList | string[] | Yes | Array of user IDs to check. |
Code example
import { getUsersInGroup } from '@/uni_modules/unix-openim-sdk'
const presentUserIDs = await getUsersInGroup({
groupID: groupID,
userIDList: candidateUserIDs,
})
const confirmedUserIDs = presentUserIDs != null ? presentUserIDs : []Return value
The Promise resolves with a string[] | null array containing strictly the subset of requested user IDs who are active members of the group.
State changes after the call
This is a local snapshot check that does not emit events. If you need complete member details or ongoing synchronization, consult Get group member list.
Was this page helpful?