updatePushServiceFroUsers method Null safety

  1. @Deprecated('Use [ChatPushManager.setConversationSilentMode] to instead')
Future<void> updatePushServiceFroUsers(
  1. {required List<String> userIds,
  2. required bool enablePush}
)

Sets whether to turn on or turn off the push notification for the the specified users.

userIds The list of users to be set.

enablePush enable push notification. true: Turns on the notification; false: Turns off the notification;

Throws A description of the issue that caused this exception. See ChatError

Implementation

@Deprecated('Use [ChatPushManager.setConversationSilentMode] to instead')
Future<void> updatePushServiceFroUsers({
  required List<String> userIds,
  required bool enablePush,
}) async {
  Map req = {'noPush': !enablePush, 'user_ids': userIds};
  Map result = await PushChannel.invokeMethod(
      ChatMethodKeys.updateUserPushService, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}