SDKsReact Native
Set global message reception
Set the global message reception option with the OpenIM React Native SDK.
globalRecvMsgOpt controls the current account's global message reception option. Use setSelfInfo() to update the field:
await OpenIMSDK.setSelfInfo({
globalRecvMsgOpt: MessageReceiveOptType.NotNotify,
});Parameter description
| Enum value | Numeric value | Description |
|---|---|---|
MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. |
MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. |
After the setting is updated, the current-user information is delivered through OnSelfInfoUpdated. See Update your profile for the listener example.
The global message reception option applies to the account. A conversation can also have its own message reception setting.
Was this page helpful?