SDKsWASM
Set conversation message reception
Set message reception and notification behavior for one conversation.
recvMsgOpt applies only to the selected conversation. Use it to implement conversation-level do not disturb or to stop receiving messages from that conversation.
import { MessageReceiveOptType } from '@openim/wasm-client-sdk';
await openimsdk.setConversation({
conversationID,
recvMsgOpt: MessageReceiveOptType.NotNotify,
});| Enum value | Numeric value | Meaning |
|---|---|---|
MessageReceiveOptType.Normal | 0 | Receive messages normally and allow notifications. |
MessageReceiveOptType.NotReceive | 1 | Do not receive messages from this conversation and do not notify. |
MessageReceiveOptType.NotNotify | 2 | Receive messages from this conversation without notifying. |
Set the account-level default through globalRecvMsgOpt; see Set global message reception. Promise completion, OnConversationChanged delivery, and a reconciliation query are three separate stages. See Get the conversation list for event merging.
Was this page helpful?