Browse SDKs · React Native
Platform
SDKsReact Native

Set group announcement

Publish or update the group notice announcement text using the OpenIM React Native SDK.

Copy

Publish or update the announcement text for a group:

await OpenIMSDK.setGroupInfo({
  groupID,
  notification: announcement,
});

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group ID to update.
notificationstringYesAnnouncement notice text. Pass an empty string "" to clear the announcement.

notification is distinct from the group description introduction.

Return value

A resolved Promise confirms that the announcement was updated on the server.

The update triggers the OnGroupInfoChanged event for all group members. Reconcile the local group item matching groupID and update its notification property. For event listener details, see Group overview.