muteUser method

Future<void> muteUser(
  1. {required String userId,
  2. int seconds = -1,
  3. String? description}
)

Mutes User. Muted User's messages are no longer delivered to current User.

Implementation

Future<void> muteUser({
  required String userId,
  int seconds = -1,
  String? description,
}) async {
  sbLog.i(StackTrace.current, 'userId: $userId');
  checkUnsupportedAction();

  if (userId.isEmpty) {
    throw InvalidParameterException();
  }

  await chat.apiClient.send(ChannelUserMuteRequest(
    chat,
    targetId: userId,
    channelType: channelType,
    channelUrl: channelUrl,
    description: description,
    seconds: seconds,
  ));
}