跳到主要内容

按会话类型设置免打扰

设置会话的消息免打扰状态

即时通讯业务用户为指定会话或超级群设置免打扰级别

方法


changeConversationTypeNotificationLevel(
type: RCIMIWConversationType,
level: RCIMIWPushNotificationLevel,
callback: IRCIMIWChangeConversationTypeNotificationLevelCallback
): Promise<number>;

参数说明

参数名参数类型描述
typeRCIMIWConversationType会话类型
levelRCIMIWPushNotificationLevel消息通知级别
callbackIRCIMIWChangeConversationTypeNotificationLevelCallback接口调用结果回调。

返回值

返回值描述
number当次接口操作的状态码。0 代表调用成功 具体结果需要实现接口回调,非 0 代表当前接口调用操作失败,不会触发接口回调,详细错误参考错误码

代码示例


const callback = {
onConversationTypeNotificationLevelChanged: (code: number) => {
//...
},
};
let code = await engine.changeConversationTypeNotificationLevel(type, level, callback);