Do not disturb overview
The do not disturb (DND) feature controls whether users receive push notifications for missed messages when offline.
- Client offline: By default, users receive push notifications for new messages. With DND enabled, the server does not trigger push notifications.
- Client in background: Messages are received directly. Implement local notification banners based on your business logic.
Prerequisites
Verify that third-party push integration is complete and push services are enabled before using DND.
DND setting levels
The SDK supports multiple DND levels for direct, group, and system channels:
- App-level DND — default for all users, lowest priority
- By channel type — user-level, per channel type
- By channel — user-level, per specific channel
- Global DND — user-level, highest priority
DND levels (NotificationLevel)
| Enum | Description |
|---|---|
| allMessage | Receive notifications for all messages |
| none | Not set (initial state) |
| mention | Only @ current user and @all messages |
| mentionUsers | Only @ current user messages |
| mentionAll | Only @all messages |
| blocked | No notifications |
See Set DND by channel type and Set DND by channel for details.
Priority order
Global DND (user) > By channel type (user) > By channel (user) > App-level DND
API reference
| Setting | Client API | Server API |
|---|---|---|
| Global DND | Global DND | DND overview |
| By channel type | Set DND by type | Set DND by type |
| By channel | Set DND by channel | Set DND by ID |