Skip to main content

设置会话免打扰,多端同步,设置免打扰后移动端将不再接收离线推送,设置成功后,SDK 会自动更新会话的 undisturbType 属性。

参数说明

名称类型描述版本
conversationConversation会话标识1.0.0
isMutebooleanYES 表示静音,NO 表示解除静音1.0.0
callbackISimpleCallback结果回调1.0.0

示例代码

Conversation conversation = new Conversation(Conversation.ConversationType.PRIVATE, "userId1");
JIM.getInstance().getConversationManager().setMute(conversation, true, new IConversationManager.ISimpleCallback() {
@Override
public void onSuccess() {

}

@Override
public void onError(int errorCode) {

}
});