SDKsReact Native
Set conversation message reception
Set the message reception option for a conversation.
Call setConversationRecvMessageOpt() to set the message reception option for one conversation.
await OpenIMSDK.setConversationRecvMessageOpt({
conversationID,
opt: MessageReceiveOptType.NotNotify,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Conversation ID to update. |
opt | MessageReceiveOptType | Yes | Message reception option for the conversation. |
Common MessageReceiveOptType values are:
| Enum value | Numeric value | Description |
|---|---|---|
MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. |
MessageReceiveOptType.NotReceive | 1 | Do not receive messages from this conversation. |
MessageReceiveOptType.NotNotify | 2 | Receive messages without notifications. |
Return result
After the call completes, the conversation's recvMsgOpt is updated. Changes in the conversation list are delivered through OnConversationChanged; see Retrieve the conversation list. For the account-level default, see Set global message reception.
Was this page helpful?