SDKsReact Native
Set group announcement
Publish or update the group notice announcement text using the OpenIM React Native SDK.
Publish or update the announcement text for a group:
await OpenIMSDK.setGroupInfo({
groupID,
notification: announcement,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group ID to update. |
notification | string | Yes | Announcement 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.
Was this page helpful?