Skip to main content

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 NameParameter TypeDescription
typeRCIMIWConversationTypeConversation type
levelRCIMIWPushNotificationLevelMessage notification level
callbackIRCIMIWChangeConversationTypeNotificationLevelCallbackCallback for interface call result.

Return Value

Return ValueDescription
numberStatus 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);