fetchSilentModeForAll method

Future<ChatSilentModeResult> fetchSilentModeForAll()

~english Gets the offline push settings at the app level for the current login user.

Return The offline push settings settings.

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

~chinese 获取当前登录用户的 app 级别的推送通知设置。

Return 推送通知设置。

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

Implementation

Future<ChatSilentModeResult> fetchSilentModeForAll() async {
  try {
    Map result = await Client.instance.pushManager
        .callNativeMethod(ChatMethodKeys.fetchSilentModeForAll);
    EMError.hasErrorFromResult(result);
    return ChatSilentModeResult.fromJson(
      result[ChatMethodKeys.fetchSilentModeForAll],
    );
  } catch (e) {
    rethrow;
  }
}