logo
On this page

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 the notifications for a group chat.
// Take a group chat as an example
var status = 2;
var conversationID = '';
var conversationType = 2; // The conversation type is group chat
zim.setConversationNotificationStatus(status, conversationID, conversationType)
    .then(function(res){
        // Operation succeeded.
    })
    .catch(function(err){
        // Operation failed.
    })
1
Copied!

Previous

Manage unread message counts

Next

Delete conversation