Do Not Disturb
Global IM UIKit supports the Do Not Disturb feature. The Conversation Do Not Disturb feature is available out of the box and can be controlled through UI operations or Global IM UIKit's API. If you need global Do Not Disturb, it can be implemented via the IMLib SDK's API.
The Do Not Disturb status will be synchronized to the server, and RC will automatically synchronize the Do Not Disturb status data across devices for users.
Setting Conversation Do Not Disturb
Global IM UIKit allows users to set a conversation to Do Not Disturb status via the UI. Once set, if the user is online and receives a new message, they can still view the message content, but Global IM UIKit will not play a ringtone or show a notification bar alert. If the client is offline, the system will not receive a remote notification alert.
Changing Conversation Do Not Disturb Status via UI
Global IM UIKit implements two methods for changing the Conversation Do Not Disturb status in the UI. The unread count of conversations in the conversation list that are in Do Not Disturb status is displayed in gray.
- In the conversation list, swipe right on a single conversation to reveal the Do Not Disturb toggle.
- In the conversation page, expand more options to reveal the Do Not Disturb toggle.
Changing Conversation Do Not Disturb Status via API
Global IM UIKit provides APIs to control the Conversation Do Not Disturb status in RCChatListViewModel
. It is recommended to use the toggleNotification:
and setNotificationLevel:forChatModels:
interfaces provided by RCChatListViewModel
. Global IM UIKit will internally handle the IMLib SDK layer interface calls and page refreshes.
Setting Conversation Do Not Disturb Level
The Do Not Disturb feature in Global IM UIKit by default only supports enabling or disabling notifications. The IMLib SDK provides more granular control over Do Not Disturb (e.g., only receiving @all mentions). You can use IMLib's API to set and query the Do Not Disturb status.
Please refer to the IMLib SDK documentation for Setting Do Not Disturb by Conversation.
If using IMLib SDK capabilities, please use the APIs in RCChannelClient
.
Setting Global Do Not Disturb
The Global Do Not Disturb feature supports setting a Do Not Disturb time window starting from any time point (HH:MM:SS
). The set Do Not Disturb time window will repeat daily until it is modified or deleted by the user. For example, if an app user wishes to set permanent all-day Do Not Disturb, they can set startTime
to 00:00:00
and period
to 1439
.
Global IM UIKit does not directly provide a setting entry in the UI or API layer. You need to use the methods in the IMLib SDK to set the Global Do Not Disturb period.
Please refer to the IMLib SDK documentation for Setting Global Do Not Disturb.
If using IMLib SDK capabilities, please use the APIs in RCChannelClient
. It is recommended to support interfaces that simultaneously configure the "Do Not Disturb Level."