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 a conversation
// Take a group conversation as example
[self.zim setConversationNotificationStatus:ZIMConversationNotificationStatusDoNotDisturb conversationID:@"CONV_ID" conversationType:ZIMConversationTypePeer callback:^(ZIMError * _Nonnull errorInfo) {
    // Set the callback for the mute result.
    if(errorInfo.code == ZIMErrorCodeSuccess) {
      // ......
    } else {
      // ......
    }
}];
1
Copied!

Previous

Manage unread message counts

Next

Delete conversation