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

Set group announcement

Publish, update, or clear group announcement text.

Copy

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

ParameterTypeRequiredDescription
groupIDstringYesTarget group identifier.
notificationstringYesNew 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.