Ultra Group Do Not Disturb Overview
Do Not Disturb functionality controls whether users can receive push notifications for offline messages when their client devices are offline.
-
Client in offline state: When there are new offline messages in a conversation, users receive messages through the push channel by default with notifications displayed. After enabling Do Not Disturb, the RC service will not trigger push notifications for related messages.
-
Client running in background: When there are new messages in a conversation, users receive messages directly. You can determine whether the app is running in the background and implement local notification popups according to business requirements.
Prerequisites
Before using Do Not Disturb functionality, verify that you have integrated [manufacturer push capabilities].
If push notifications are not required, you can disable push services (for the current device) by setting the enablePush parameter to false in the SDK initialization configuration. You can also configure the device to not receive push notifications when disconnected.
Do Not Disturb Configuration Dimensions
The client SDK supports multiple dimensions of Do Not Disturb settings for ultra group services:
-
App-level Do Not Disturb settings
-
Default Do Not Disturb level by ultra group or channel
-
Do Not Disturb level by conversation type
-
Do Not Disturb level by conversation
-
Do Not Disturb level by ultra group channel
-
Global Do Not Disturb
Ultra group offline message push notifications are also affected by the Ultra Group Default Push Frequency Settings in the Console. .
App-Level Do Not Disturb Settings
Configure the default Do Not Disturb level for all users of an entire application by App Key. By default, no setting is applied, which is equivalent to receiving notifications for all messages. This configuration is not currently available in the Console. Submit a ticket if needed.
-
Notify all messages: Users under the current App can receive push notifications for any message.
-
Not set: By default, all messages trigger notifications.
-
Only notify @ messages: Users under the current App only receive push notifications for messages that mention (@) the current user or all group members.
-
Only notify @ specific users: Users under the current App only receive push notifications for messages that mention (@) the current user. For example: Only Zhang San will receive notifications for messages like "@Zhang San Hello".
-
Only notify @ all members: Users under the current App only receive push notifications for messages that mention (@) all group members.
-
Do not notify any messages: Users under the current App will not receive push notifications for any offline messages.
-
No push for group messages except @ mentions: Users under the current App receive push notifications for one-to-one messages, messages that mention (@) specific users, and messages that mention (@) all group members.
When the RC service determines whether to send push notifications, if any of the following user-level Do Not Disturb configurations exist, the user-level configuration takes precedence:
-
Do Not Disturb level by conversation type
-
Do Not Disturb level by conversation
-
Global Do Not Disturb
If no user-level configuration exists, the default Do Not Disturb level of the ultra group/channel to which the message belongs applies. App-level Do Not Disturb configurations have the lowest priority.
Default Do Not Disturb Level by Ultra Group/Channel
The client SDK supports configuring the categories of messages that trigger push notifications for all members of a specified ultra group, or completely disabling notifications. The client SDK provides PushNotificationLevel with the following six levels:
| Enum Value | Numeric Value | Description |
|---|---|---|
| PUSH_NOTIFICATION_LEVEL_ALL_MESSAGE | -1 | After disconnecting from the RC service, all users of the current ultra group can receive notifications for all messages in the specified ultra group (or channel). |
| PUSH_NOTIFICATION_LEVEL_DEFAULT | 0 | Not set. This is the initial state when no setting is applied. In this state, if both the ultra group and group channel are unset, the default Do Not Disturb level for the ultra group and channel is considered to notify all messages. |
| PUSH_NOTIFICATION_LEVEL_MENTION | 1 | After disconnecting from the RC service, all users of the current ultra group only receive notifications for messages in the specified ultra group (or channel) that mention (@) the current user or all group members. |
| PUSH_NOTIFICATION_LEVEL_MENTION_USERS | 2 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified ultra group (or channel) that mention (@) the current user. For example: Zhang San will only receive notifications for messages like "@Zhang San Hello". |
| PUSH_NOTIFICATION_LEVEL_MENTION_ALL | 4 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified ultra group (or channel) that mention (@) all group members. |
| PUSH_NOTIFICATION_LEVEL_BLOCKED | 5 | The current user does not receive push notifications for any messages in the specified ultra group (or channel). |
For specific configuration methods, refer to Setting Default Do Not Disturb for Groups/Channels.
The default Do Not Disturb logic set for a specified ultra group automatically applies to all channels under the group. If a default Do Not Disturb logic is separately configured for a channel, the channel's default setting takes precedence. When the RC service determines whether to send push notifications to users, if any of the following user-level Do Not Disturb configurations exist simultaneously, the following configurations take precedence:
-
Do Not Disturb level by conversation type
-
Do Not Disturb level by conversation
-
Do Not Disturb level by ultra group channel
-
Global Do Not Disturb
Do Not Disturb Level by Conversation Type
This feature is supported starting from client SDK version 5.2.2.1. It is a user-level setting.
The client SDK provides PushNotificationLevel, allowing users to configure the categories of messages that trigger push notifications for conversation types (one-to-one chat, group chat, ultra group, system conversation), or completely disable notifications. The following six levels are available:
| Enum Value | Numeric Value | Description |
|---|---|---|
| PUSH_NOTIFICATION_LEVEL_ALL_MESSAGE | -1 | After disconnecting from the RC service, the current user can receive notifications for all messages in the specified conversation type. |
| PUSH_NOTIFICATION_LEVEL_DEFAULT | 0 | Not set. This is the initial state when no setting is applied. Note: In this state, if both the ultra group and group channel are unset, the default Do Not Disturb level for the ultra group and channel is considered to notify all messages. |
| PUSH_NOTIFICATION_LEVEL_MENTION | 1 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified conversation type that mention (@) the current user or all group members. |
| PUSH_NOTIFICATION_LEVEL_MENTION_USERS | 2 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified conversation type that mention (@) the current user. For example: Zhang San will only receive notifications for messages like "@Zhang San Hello". |
| PUSH_NOTIFICATION_LEVEL_MENTION_ALL | 4 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified conversation type that mention (@) all group members. |
| PUSH_NOTIFICATION_LEVEL_BLOCKED | 5 | The current user does not receive push notifications for any messages in the specified conversation type. |
For specific configuration methods, refer to Setting Do Not Disturb by Conversation Type.
When the RC service determines whether to send push notifications to users, if any of the following user-level Do Not Disturb configurations exist simultaneously, the following configurations take precedence:
-
Do Not Disturb level by conversation
-
Do Not Disturb level by ultra group channel
-
Global Do Not Disturb
Do Not Disturb Level by Conversation
This feature is supported starting from client SDK version 5.2.2. It is a user-level setting.
The client SDK provides PushNotificationLevel, allowing users to configure the categories of messages that trigger notifications for a conversation, or completely disable notifications. The following six levels are available:
| Enum Value | Numeric Value | Description |
|---|---|---|
| PUSH_NOTIFICATION_LEVEL_ALL_MESSAGE | -1 | After disconnecting from the RC service, the current user can receive notifications for all messages in the specified conversation type. |
| PUSH_NOTIFICATION_LEVEL_DEFAULT | 0 | Not set. This is the initial state when no setting is applied. Note: In this state, if both the ultra group and group channel are unset, the default Do Not Disturb level for the ultra group and channel is considered to notify all messages. |
| PUSH_NOTIFICATION_LEVEL_MENTION | 1 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified conversation that mention (@) the current user or all group members. |
| PUSH_NOTIFICATION_LEVEL_MENTION_USERS | 2 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified conversation that mention (@) the current user. For example: Zhang San will only receive notifications for messages like "@Zhang San Hello". |
| PUSH_NOTIFICATION_LEVEL_MENTION_ALL | 4 | After disconnecting from the RC service, the current user only receives notifications for messages in the specified conversation that mention (@) all group members. |
| PUSH_NOTIFICATION_LEVEL_BLOCKED | 5 | The current user does not receive push notifications for any messages in the specified conversation. |
For specific configuration methods, refer to Setting Do Not Disturb by Conversation.
Starting from 2022.09.01, the Do Not Disturb level set for a specified ultra group automatically applies to all channels under the group. When the RC service determines whether to send push notifications to users, if any of the following user-level Do Not Disturb configurations exist simultaneously, the following configurations take precedence:
-
Do Not Disturb level by ultra group channel
-
Global Do Not Disturb
Do Not Disturb Level by Ultra Group Channel
This feature is supported starting from client SDK version 5.2.2. It is a user-level setting.
The client SDK provides PushNotificationLevel, allowing users to configure the categories of messages that trigger notifications for a specified ultra group channel, or completely disable notifications. The following six levels are available:
| Enum Value | Numeric Value | Description |
|---|---|---|
| PUSH_NOTIFICATION_LEVEL_ALL_MESSAGE | -1 | After disconnecting from the RC service, the current user can receive notifications for all messages in the specified ultra group channel. |
| PUSH_NOTIFICATION_LEVEL_DEFAULT | 0 | Not set. This is the initial state when no setting is applied. Note: In this state, if both the ultra group and group channel are unset, the default Do Not Disturb level for the ultra group and channel is considered to notify all messages. |
| PUSH_NOTIFICATION_LEVEL_MENTION | 1 | After disconnecting from the RC service, the current user can receive notifications for messages in the specified ultra group channel that mention (@) the current user or all group members. |
| PUSH_NOTIFICATION_LEVEL_MENTION_USERS | 2 | After disconnecting from the RC service, the current user can receive notifications for messages in the specified ultra group channel that mention (@) the current user. For example: Zhang San will only receive notifications for messages like "@Zhang San Hello". |
| PUSH_NOTIFICATION_LEVEL_MENTION_ALL | 4 | After disconnecting from the RC service, the current user can receive notifications for messages in the specified ultra group channel that mention (@) all group members. |
| PUSH_NOTIFICATION_LEVEL_BLOCKED | 5 | The current user does not receive push notifications for any messages in the specified ultra group channel. |
For specific configuration methods, refer to Setting Do Not Disturb by Channel.
When determining whether to send push notifications to a user, the RC server will prioritize the user's Global Do Not Disturb settings if they have been configured.
Global Do Not Disturb
Starting from version 5.2.2, the client SDK provides PushNotificationQuietHoursLevel, allowing users to configure when to receive notifications and which message categories should trigger notifications. Three levels are available:
| Enum Value | Numeric Value | Description |
|---|---|---|
| PUSH_NOTIFICATION_QUIET_HOURS_LEVEL_DEFAULT | 0 | Not set. If unset, the SDK will first check the user-level Do Not Disturb settings for the message's group and other non-user-level settings before determining whether to send a push notification. |
| PUSH_NOTIFICATION_QUIET_HOURS_LEVEL_MENTION_MESSAGE | 1 | When disconnected from the RC server, the current user will only receive notifications for messages that mention (@) them or all group members in specified conversations during designated time periods. |
| PUSH_NOTIFICATION_QUIET_HOURS_LEVEL_BLOCKED | 5 | The current user will not receive push notifications for any messages during specified time periods. |
For specific configuration methods, refer to Global Do Not Disturb.
SDK versions prior to 5.2.2 do not support configuring notification-triggering message categories and only allow enabling or disabling push notifications.
Priority of Do Not Disturb Settings
For ultra group conversations, the RC server follows the priority order below when checking Do Not Disturb configurations. The highest-priority setting (from left to right) determines whether to trigger push notifications:
Global Do Not Disturb (user-level) > Channel-specific Do Not Disturb in ultra groups (user-level) > Conversation-specific Do Not Disturb (user-level) > Conversation-type-specific Do Not Disturb (user-level) > Default Do Not Disturb for specified ultra group channels (all group members) > Ultra group-wide Do Not Disturb (all group members) > App-level Do Not Disturb
API Interface List
The following table describes the Do Not Disturb configuration APIs available for ultra group conversations.
| Configuration Scope | Client API | Server API |
|---|---|---|
| Set Global Do Not Disturb level for specified time periods (user-level) | See Global Do Not Disturb. | See Set User Do Not Disturb Period |
| Set Channel-specific Do Not Disturb level in ultra groups (user-level) | See Channel-based Do Not Disturb. | See Set Conversation Do Not Disturb. |
| Set Conversation-specific Do Not Disturb level (user-level) | See Target-based Do Not Disturb. | See Set Conversation Do Not Disturb. |
| Set Conversation-type-specific Do Not Disturb level (user-level) | See Type-based Do Not Disturb. | See Set Conversation Type Do Not Disturb. |
| Set Default Do Not Disturb for specified ultra groups/channels (all group members) | See Set Group/Channel Default Do Not Disturb under "Ultra Group Management". | See Set Group/Channel Default Do Not Disturb under "Ultra Group Management". |
| Set App-level Do Not Disturb | Not available in client SDK. | Not available in server API. |