removeConversationSilentMode method

Future<void> removeConversationSilentMode({
  1. required String conversationId,
  2. required ChatConversationType type,
})

~english Removes the offline push notification settings for a conversation.

After the setting is deleted, the conversation follows the setting of ChatPushManager.setSilentModeForAll of the current logged-in user.

Param conversationId The conversation ID.

Param type The conversation type.

Throws A description of the exception. See ChatError. ~end

~chinese 删除指定会话的离线推送通知设置。

清除后,会话遵循当前登录用户的设置 ChatPushManager.setSilentModeForAll

Param conversationId 会话 ID。

Param type 会话类型。

Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。 ~end

Implementation

Future<void> removeConversationSilentMode({
  required String conversationId,
  required ChatConversationType type,
}) async {
  try {
    Map req = {};
    req["convId"] = conversationId;
    req["conversationType"] = type.index;
    Map result = await platform_interface.Client.instance.pushManager
        .callNativeMethod(ChatMethodKeys.removeConversationSilentMode, req);
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}