API 1: Set default Do Not Disturb for ultra group
Set by administrators, this API applies to all group members and channels within the ultra group. It has lower priority. If a member uses API 3 or 4, their settings take precedence.
/*!
Set default message status for ultra group conversation
@param targetId Conversation ID
@param level Level
@param successBlock Callback for successful setup
@param errorBlock Callback for failed setup [status: error code for failure]
*/
- (void)setUltraGroupConversationDefaultNotificationLevel:(NSString *)targetId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBlock;
API 2: Set default Do Not Disturb for ultra group channel
Set by administrators, this API applies to all group members but only to the specified channel. It has lower priority. If a member uses API 3 or 4, their settings take precedence.
/*!
Set default message status for ultra group channel
@param targetId Conversation ID
@param channelId Channel ID
@param level Message notification level
@param successBlock Callback for successful setup
@param errorBlock Callback for failed setup [status: error code for failure]
@remarks Conversation
*/
- (void)setUltraGroupConversationChannelDefaultNotificationLevel:(NSString *)targetId
channelId:(NSString *)channelId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBlock;
API 3: Set Do Not Disturb for conversation
A user-level API that only affects the user who sets it. It has higher priority. If there’s a conflict with API 1 or 2, the user’s settings take precedence.
Use this API if you’re using an ultra group without channels (no channelId passed).
/*!
Set message notification status for conversation
@param conversationType Conversation type
@param targetId Conversation ID
@param level Message notification level
@param successBlock Callback for successful setup
@param errorBlock Callback for failed setup [status: error code for failure]
@discussion To remove message notification, set level to RCPushNotificationLevelDefault
@remarks Conversation
*/
- (void)setConversationNotificationLevel:(RCConversationType)conversationType
targetId:(NSString *)targetId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBlock;
API 4: Set Do Not Disturb for channel
A user-level API that only affects the user who sets it. It has higher priority. If there’s a conflict with API 1 or 2, the user’s settings take precedence.
Use this API if you’re using an ultra group with channels (channelId passed). To set Do Not Disturb for all channels, iterate through the channel list and set individually.
/*!
Set message notification status for channel
@param conversationType Conversation type
@param targetId Conversation ID
@param channelId Channel ID
@param level Message notification level
@param successBlock Callback for successful setup
@param errorBlock Callback for failed setup [status: error code for failure]
@discussion To remove message notification, set level to RCPushNotificationLevelDefault
@remarks Conversation
*/
- (void)setConversationChannelNotificationLevel:(RCConversationType)conversationType
targetId:(NSString *)targetId
channelId:(NSString *)channelId
level:(RCPushNotificationLevel)level
success:(void (^)(void))successBlock
error:(void (^)(RCErrorCode status))errorBlock;