Mute or Unmute Chats
Chat comprises anything related to messages like:- New Message (Text, media, or Custom messages like Polls)
- Edited Message
- Deleted Message
- Response in threads
Mute Chats
You can specify the UIDs and/or GUIDs to be muted. You can mute chats for these conversations for a specific amount of time.Parameters | Value | Description |
---|---|---|
uids | Array of UIDs | This parameter allows you to mute one-on-one chat for the mentioned UIDs. |
guids | Array of GUIDs | This parameter allows you to mute group chat for the mentioned GUIDs. |
timeInMS | String consisting of UNIX timestamp | This parameter allows you to mute chats for a specific amount of time for the required UIDs or GUIDs After the mentioned duration, the Push Notifications are received. Eg: “1628425767881” |
callExtension()
method provided by CometChat SDK.
Unmute Chats
Used to unmute the chats for certain conversations before the mentioned time during muting.Parameters | Value | Description |
---|---|---|
uids | Array of UIDs | This parameter allows you to unmute one-on-one chat for the mentioned UIDs. |
guids | Array of GUIDs | This parameter allows you to unmute group chat for the mentioned GUIDs. |
callExtension()
method provided by CometChat SDK.
Mute or Unmute Calls
You can mute the notifications for one-on-one or group calls. This works for Default calling (video or audio calls) offered by CometChat.Mute Calls
You can specify the UIDs and/or GUIDs to be muted. You can mute calls for these conversations for the said amount of time.Parameters | Value | Description |
---|---|---|
uids | Array of UIDs | This parameter allows you to mute one-on-one calls for the mentioned UIDs. |
guids | Array of GUIDs | This parameter allows you to mute group calls for the mentioned GUIDs. |
timeinMS | String consisting of UNIX timestamp | This parameter allows you to mute calls for a specific amount of time for the required UIDs or GUIDs After the mentioned duration, the Push Notifications are received. Eg: “1628425767881” |
callExtension()
method provided by CometChat SDK.
Unmute Calls
Used to unmute calls for certain conversations before the mentioned time during muting.Parameters | Value | Description |
---|---|---|
uids | Array of UIDs | This parameter allows you to unmute one-on-one calls for the mentioned UIDs. |
guids | Array of GUIDs | This parameter allows you to unmute group calls for the mentioned GUIDs. |
User Settings
Apart from the feature to mute/unmute a set of UIDs or GUIDs using the above APIs, apps can have push notifications according to the user settings. The following user settings can be set:Settings | Description |
---|---|
Do Not Disturb | When turned ON, the “Do Not Disturb” parameter disables the Push Notifications entirely for the user. The user stops receiving push notifications until this setting is explicitly turned OFF. This overrides all the following settings. |
Allow only Mentions | Until turned OFF, the notifications are only sent for text messages for the mentioned receiver of the message |
Mute all one-on-one chat | This parameter can be used to mute chat notifications for all one-on-one conversations. The user will not receive push notifications until this is turned OFF. |
Mute all group chat | This parameter can be used to mute chat notifications for all group conversations. The user will not receive push notifications until the parameter is turned OFF. |
Mute all one-on-one calls | This preference can be used to mute call notifications for all one-on-one conversations. The user will not receive push notifications until the parameter is turned OFF. |
Mute all group calls | This parameter can be used to mute call notifications for all group conversations. The user will not receive push notifications until this is turned OFF. |
Save User Settings
The User settings object needs to be submitted as follows. All the fields are mandatory:callExtension()
method provided by CometChat SDK.
Fetch User Settings
Fetches all the user settings that are saved by the user. This also returns the list of muted UIDs and GUIDs along with the said time for muting. This functionality uses thecallExtension()
method provided by CometChat SDK.