fetchChatRoomBlockList method
~english 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. ~end
~chinese 以分页的形式获取聊天室黑名单列表。
仅聊天室所有者和管理员可调用此方法。
Param roomId
聊天室 ID。
Param pageNum
当前页码,从 1 开始。
Param pageSize
每页返回的黑名单中的用户数。
Return 返回聊天室黑名单列表。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end
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;
}
}