fetchChatRoomBlockList method
Gets the chat room block list with pagination.
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 users on the block list per page.
Return The list of the blocked chat room members.
Throws A description of the exception. See ChatError.
Implementation
Future<List<String>> fetchChatRoomBlockList(
String roomId, {
int pageNum = 1,
int pageSize = 200,
}) async {
Map req = {"roomId": roomId, "pageNum": pageNum, "pageSize": pageSize};
Map result =
await _channel.invokeMethod(ChatMethodKeys.fetchChatRoomBlockList, req);
try {
ChatError.hasErrorFromResult(result);
return result[ChatMethodKeys.fetchChatRoomBlockList]?.cast<String>() ??
[];
} on ChatError catch (e) {
throw e;
}
}