超级群各个免打扰接口区别

1. 接口一:设置超级群默认免打扰。

一般由管理员设置的接口,针对超级群的所有群成员生效,针对超级群下所有频道生效,优先级较低。如果群成员自己调用接口三、四设置超级群的免打扰,那么以群成员自己设置的为准。

/*!
设置超级群的默认消息状态
@param targetId 会话 ID
@param level 等级
@param successBlock 设置成功的回调
@param errorBlock 设置失败的回调 [status:设置失败的错误码]
*/
- (void)setUltraGroupConversationDefaultNotificationLevel:(NSString *)targetId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBlock;
2. 接口二:设置超级群频道默认免打扰。

一般由管理员设置的接口,针对超级群的所有群成员生效,仅针对设置的频道生效,优先级较低。如果群成员自己调用接口三、四设置超级群的免打扰,那么以群成员自己设置的为准。

/*!
设置超级群频道的默认消息状态
@param targetId                    会话 ID
@param channelId                   频道 ID
@param level                       消息通知级别
@param successBlock                设置成功的回调
@param errorBlock                  设置失败的回调 [status:设置失败的错误码]
@remarks 会话
*/
- (void)setUltraGroupConversationChannelDefaultNotificationLevel:(NSString *)targetId
channelId:(NSString *)channelId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBlock;
3. 接口三:设置会话的免打扰。

用户级别接口,设置后仅针对自己生效,对其他群成员无影响,优先级较高。设置后如果和管理员调用接口一、二设置的有冲突,则以用户自己设置的为准。

如果是使用超级群但是并没有创建频道,也就是说您收发消息都没有传 channelId 的话,可以调用下面接口设置免打扰。

/*!
设置会话的消息提醒状态
@param conversationType            会话类型
@param targetId                    会话 ID
@param level                       消息通知级别
@param successBlock                设置成功的回调
@param errorBlock                  设置失败的回调 [status:设置失败的错误码]
@discussion 如要移除消息提醒状态,设置level为RCPushNotificationLevelDefault
@remarks 会话
*/- (void)setConversationNotificationLevel:(RCConversationType)conversationType
targetId:(NSString *)targetId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBlock;
4. 接口四:设置频道的免打扰。

用户级别接口,设置后仅针对自己生效,对其他群成员无影响,优先级较高。设置后如果和管理员调用接口一、二设置的有冲突,则以用户自己设置的为准。

如果是使用超级群并且创建了频道,也就是说您收发消息都传了 channelId 的话,可以调用下面接口针对频道设置免打扰。如果想对超级群下所有频道都设置免打扰的话,需要您遍历频道列表分别设置。

/*!
设置频道的消息提醒状态
@param conversationType            会话类型
@param targetId                    会话 ID
@param channelId                   频道 ID
@param level                       消息通知级别
@param successBlock                设置成功的回调
@param errorBlock                  设置失败的回调 [status:设置失败的错误码]
@discussion如果您需要移除消息通知,level参数传入RCPushNotificationLevelDefault即可
@remarks 会话
*/
- (void)setConversationChannelNotificationLevel:(RCConversationType)conversationType
targetId:(NSString *)targetId
channelId:(NSString *)channelId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBl

详情查看:融云-为用户提供IM即时通讯和实时音视频通信云服务

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值