Mute a conversation
Introduction
Mute a conversation: A user can mute any conversation, and when the ZIM SDK receives a message for the conversation, it does not send a push notification, and the total count of unread messages does not increase.
Procedure
To mute a conversation, call the setConversationNotificationStatus method with the conversationID
parameter.
Sample code
// Mute notifications for specified conversations.
// Mute a conversation
// Take a group conversation as example
zim. setConversationNotificationStatus(ZIMConversationNotificationStatusDoNotDisturb, "CONV_ID", ZIMConversationTypePeer, [=](ZIMError errorInfo) {
// Set the callback for the results of mute notifications.
if(errorInfo.code == ZIMErrorCodeSuccess) {
// ......
} else {
// ......
}
});
1