Skip to main content

Do not disturb (DND) overview

The Do Not Disturb (DND) feature controls whether a user receives push notifications for offline messages when their client device is offline.

  • When the client is offline: By default, users receive push notifications for new messages in a channel. After enabling DND, the Nexconn server will not trigger push notifications for the affected messages.
  • When the client is running in the background: Users receive messages directly. If you are using the Chat SDK, you need to determine whether the app is running in the background yourself, and implement local notification pop-ups based on your business requirements.

Prerequisites

Before using the DND feature, verify that you have integrated APNs push notifications.

DND configuration dimensions

The client SDK supports the following DND configuration dimensions for Direct Channel, Group channel, and system channel:

  • App-level DND settings
  • DND level by channel type
  • DND level by channel
  • Global DND

App-Level DND settings

This configures the default DND level for all users under an App Key. By default, it isn't set, which means users receive notifications for all messages. This configuration isn't currently available in the console. If you need it, submit a support ticket.

  • All messages notify: Users under the current App Key can receive push notifications for any message.
  • Not set: Default — all messages notify.
  • @ messages only: Under the current App Key, push notifications are only sent to offline users for messages that mention (@) a specific user or all group members.
  • @ specific user only: Under the current App Key, users only receive push notifications for messages that mention (@) them directly. For example, only the mentioned user receives a notification for "@Alice Hello".
  • @ all members only: Under the current App Key, users only receive push notifications for messages that mention (@) all group members.
  • No notifications: Under the current App Key, users do not receive push notifications for any messages — no offline message triggers a push.
  • Group channel messages suppressed except @ mentions: Under the current App Key, users receive push notifications for Direct Channel messages, messages that mention (@) specific users, and messages that mention (@) all group members.

When the Nexconn server evaluates whether to send a push notification, the App Key-level DND configuration has the lowest priority. If any of the following user-level DND configurations exist, the user-level configuration takes precedence:

  • DND level by channel type
  • DND level by channel
  • Global DND

DND level by channel type

tip

This is a user-level setting.

Parameters

The client SDK provides NCChannelNoDisturbLevel, which allows users to configure the categories of messages that trigger push notifications for a channel type (Direct Channel, Group channel, Community channel, system channel), or to turn off notifications entirely. The following six levels are available:

Enum ValueNumeric ValueDescription
NCChannelNoDisturbLevelAllMessage-1After disconnecting from the Nexconn server, the current user can receive notifications for all messages in channels of the specified type.
NCChannelNoDisturbLevelDefaultLevel0Not set. This is the initial state when no configuration has been applied.
NCChannelNoDisturbLevelMention1After disconnecting from the Nexconn server, the current user only receives notifications for messages that mention (@) themselves or all group members in channels of the specified type.
NCChannelNoDisturbLevelMentionUsers2After disconnecting from the Nexconn server, the current user only receives notifications for messages that mention (@) themselves in channels of the specified type. For example, a user only receives a notification for "@Alice Hello".
NCChannelNoDisturbLevelMentionAll4After disconnecting from the Nexconn server, the current user only receives notifications for messages that mention (@) all group members in channels of the specified type.
NCChannelNoDisturbLevelMuted5The current user does not receive push notifications for any messages in channels of the specified type.

For configuration details, see DND by Channel Type.

When the Nexconn server evaluates whether to send a push notification, if any of the following user-level DND configurations also exist, they take precedence:

  • DND level by channel
  • Global DND

DND level by channel

tip

Supported by the client SDK. This is a user-level setting.

Parameters

The client SDK provides NCChannelNoDisturbLevel, which allows users to configure the categories of messages that trigger notifications for a specific channel, or to turn off notifications entirely. The following six levels are available:

Enum ValueNumeric ValueDescription
NCChannelNoDisturbLevelAllMessage-1After disconnecting from the Nexconn server, the current user can receive notifications for all messages in the specified channel.
NCChannelNoDisturbLevelDefaultLevel0Not set. This is the initial state when no configuration has been applied.
NCChannelNoDisturbLevelMention1After disconnecting from the Nexconn server, the current user only receives notifications for messages that mention (@) themselves or all group members in the specified channel.
NCChannelNoDisturbLevelMentionUsers2After disconnecting from the Nexconn server, the current user only receives notifications for messages that mention (@) themselves in the specified channel. For example, a user only receives a notification for "@Alice Hello".
NCChannelNoDisturbLevelMentionAll4After disconnecting from the Nexconn server, the current user only receives notifications for messages that mention (@) all group members in the specified channel.
NCChannelNoDisturbLevelMuted5The current user does not receive push notifications for any messages in the specified channel.

For configuration details, see DND by Channel.

When the Nexconn server evaluates whether to send a push notification, if the user has configured Global DND, the Global DND configuration takes precedence.

Global DND

Parameters

The client SDK provides NCNoDisturbTimeLevel, which allows users to configure when they receive notifications and what categories of messages trigger them. The following three levels are available:

Enum ValueNumeric ValueDescription
NCNoDisturbTimeLevelDefault0Not set. When not set, the SDK falls back to checking user-level DND settings for the message's group and other non-user-level configurations to determine whether to send a push notification.
NCNoDisturbTimeLevelMention1After disconnecting from the Nexconn server, the current user only receives notifications during the specified quiet hours for messages that mention (@) themselves or all group members in the specified channel.
NCNoDisturbTimeLevelMuted5The current user does not receive push notifications for any messages during the specified quiet hours.

For configuration details, see Global DND.

DND priority order

For Direct Channel, Group channel, and system channel, the Nexconn server evaluates DND configurations in the following order. Priority decreases from left to right — the highest-priority configuration determines whether to trigger a push:

Global DND (user-level) > DND by channel type (user-level) > DND by channel (user-level) > App-level DND

API reference

The table below describes the DND configuration APIs applicable to Direct Channel, Group channel, and system channel.

DND Configuration DimensionClient APIServer API
Set app-wide global DND level for a specified time range.See Global DND.See DND overview.
Set DND level by channel typeSee DND by Channel Type.See Set DND by Channel Type.
Set DND level by channelSee DND by Channel.See Set DND by Channel.
Set App-level DNDNo client SDK API available.No server API available.