Get specified group profiles
Batch query group metadata for targeted groups by group ID.
Invoke getSpecifiedGroupsInfo() to batch retrieve latest group metadata for known group IDs. This method queries existing group profiles; it is not a discovery directory for browsing unfamiliar public groups.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupIDs | string[] | Yes | An array of group IDs to query. |
When querying a single group, wrap the groupID in a single-element array.
Code example
import { getSpecifiedGroupsInfo } from '@/uni_modules/unix-openim-sdk'
const result = await getSpecifiedGroupsInfo(groupIDs)
const groups = result != null ? result.groups : []Return value
The Promise resolves with an OpenIMGroupListResult | null object containing an array of OpenIMGroupItem elements in groups. Returned elements are not guaranteed to match the array order of groupIDs; match records using groupID. For field definitions, see Group overview.
State changes after the call
This query retrieves a local snapshot without modifying data or triggering events. While views are active, observe subsequent updates through onGroupInfoChanged as described in Group overview. Re-query after network reconnections to verify current values.
Was this page helpful?