Browse SDKs · React Native
SDKsReact Native

Publish a group announcement

OpenIM React Native SDK guide for publish a group announcement.

Copy

Call setGroupInfo() to set or update a group announcement.

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

groupID is the target group ID and notification is the announcement content. Pass an empty string to clear the announcement. The announcement and the group description, introduction, are separate fields.

Return value

When the call completes, the group announcement is updated. Group profile changes trigger OnGroupInfoChanged; see Group overview for event handling.