setSilentModeForAll method

Future<void> setSilentModeForAll({
  1. required ChatSilentModeParam param,
})

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

Param param The offline push parameters.

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

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

Param param 离线推送参数。

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

Implementation

Future<void> setSilentModeForAll({
  required ChatSilentModeParam param,
}) async {
  Map req = {};
  req["param"] = param.toJson();
  Map result = await PushChannel.invokeMethod(
    ChatMethodKeys.setSilentModeForAll,
    req,
  );
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}