SDKsuni-app / uni-app x
Set group announcement
Publish, update, or clear group announcement text.
The notification property represents the group announcement, distinct from the introduction description field. While clients can conditionally reveal the edit interface based on member role, OpenIMServer authoritative verification always enforces modification permissions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group identifier. |
notification | string | Yes | New group announcement text; pass an empty string to clear the announcement. |
Code example
import { setGroupInfo } from '@/uni_modules/unix-openim-sdk'
await setGroupInfo({
groupID,
notification: announcement.trim(),
})Return value
The Promise resolves with void once OpenIMServer updates the group announcement.
State changes after the call
A resolved Promise confirms that the announcement was accepted. Connected clients receive onGroupInfoChanged, at which point the UI updates the announcement matching groupID. To calibrate state, invoke Get specified group profiles. For complete group event listener registration, see Group overview.
Was this page helpful?