Set group extension data
Store custom application-level extension strings on a specified group.
The ex property stores an opaque string; the SDK does not perform automatic JSON merging. When multiple application modules share this attribute, structure namespaces carefully and retain other fields before writing.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group identifier. |
ex | string | Yes | Custom extension string; completely overwrites existing group extension data. |
Code example
import { setGroupInfo } from '@/uni_modules/unix-openim-sdk'
await setGroupInfo({
groupID,
ex: JSON.stringify({ projectID: 'project-42' }),
})If the group already contains extension data, retrieve the current value, merge changes within your application layer, and submit the entire serialized string.
Return value
The Promise resolves with void once OpenIMServer updates the group extension data.
State changes after the call
A resolved Promise confirms that the extension string was saved. Update the local group's ex field optimistically, and confirm final state when onGroupInfoChanged arrives matching groupID. For complete group event listener registration, see Group overview.
Was this page helpful?