@beeworks/imsdk / conversation / setConversationWatched
setConversationWatched()
setConversationWatched(
conversation,watched):Promise<Conversation>
设置会话免打扰
开启或关闭会话的消息推送(免打扰)。 操作成功后,会分发 EventType.CONVERSATION_WATCHED_CHANGED 事件。
Parameters
conversation
会话对象 Conversation
watched
boolean
是否接收推送(true: 接收推送/关闭免打扰; false: 不接收/开启免打扰)
Returns
Promise<Conversation>
Promise<Conversation> - 更新后的会话对象
Example
typescript
// 开启免打扰(不接收推送)
await setConversationWatched(conversation, false);