Mute Notification

Mute Chat#

To Mute the chat use below method which disables the notification for the chat when the new messages are received or any action on group chat.

await SDK.updateMuteNotification(`TO_JID`, `IS_MUTED`);
StatusDescriptionTypeRequired
TO_JIDArray of To User/Group JIDsJID Arraytrue
IS_MUTEDtrue for muting the chat, false for removingBooleantrue

Mute Notification Settings#

Use the following method to manage notification settings, enabling or disabling notifications when any action occurs.

await SDK.updateMuteNotificationSettings(`IS_MUTED`);
StatusDescriptionTypeRequired
IS_MUTEDtrue for muting the notification, false for removingBooleantrue

Get All Muted Chats and Mute Notification Settings#

Use the following method to retrieve all muted chats and the mute notification settings.

await SDK.getMutedUsers();

Example Response#

{
statusCode: 200,
message: "Sucess",
data:{
muteSettingStatus: true || false,
mutedChats: [
{
"chatId": "12345678",
"chatType": "singlechat",
"mutedOn": 1740143571187
}
]
}
}
note

Returns the mutedChat array list only if there are muted chats.