Set Do Not Disturb by Conversation Type
Set Message Do Not Disturb Status for Conversations
IM service users can set the Do Not Disturb level for specified conversations or ultra groups.
Method
changeConversationTypeNotificationLevel(
type: RCIMIWConversationType,
level: RCIMIWPushNotificationLevel,
callback: IRCIMIWChangeConversationTypeNotificationLevelCallback
): Promise<number>;
Parameter Description
Parameter Name | Parameter Type | Description |
---|---|---|
type | RCIMIWConversationType | Conversation type |
level | RCIMIWPushNotificationLevel | Message notification level |
callback | IRCIMIWChangeConversationTypeNotificationLevelCallback | Callback for interface call result. |
Return Value
Return Value | Description |
---|---|
number | Status code of the current interface operation. 0 indicates a successful call. The specific result needs to be implemented in the interface callback. Non-zero indicates that the current interface call operation failed, and the interface callback will not be triggered. For detailed errors, refer to the error codes. |
Code Example
const callback = {
onConversationTypeNotificationLevelChanged: (code: number) => {
//...
},
};
let code = await engine.changeConversationTypeNotificationLevel(type, level, callback);