fetchChatRoomMuteList method

Future<List<String>> fetchChatRoomMuteList(
  1. String roomId,
  2. {int pageNum = 1,
  3. int pageSize = 200}

Gets the list of members who are muted in the chat room from the server.

Only the chat room owner or admin can call this method.

Param roomId The chat room ID.

Param pageNum The page number, starting from 1.

Param pageSize The number of muted members per page.

Return The muted member list.

Throws A description of the exception. See ChatError.


Future<List<String>> fetchChatRoomMuteList(
  String roomId, {
  int pageNum = 1,
  int pageSize = 200,
}) async {
  Map req = {"roomId": roomId, "pageNum": pageNum, "pageSize": pageSize};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.fetchChatRoomMuteList, req);
  try {
    return result[ChatMethodKeys.fetchChatRoomMuteList]?.cast<String>() ?? [];
  } on ChatError catch (e) {
    throw e;