fetchBlockListFromServer method
Gets the group blocklist from the server. Only the group owner and admins can call this method.
Param groupId The group ID.
Param pageNum The page number.
Param pageSize The number of results expected per page.
Returns The group blocklist.
Throws Exception description, see ChatError.
Implementation
Future<List<String>> fetchBlockListFromServer(
String groupId, {
int pageSize = 200,
int pageNum = 1,
}) async {
try {
Map req = {'groupId': groupId, 'pageNum': pageNum, 'pageSize': pageSize};
Map result = await platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.getGroupBlockListFromServer, req);
ChatError.hasErrorFromResult(result);
return result[ChatMethodKeys.getGroupBlockListFromServer]
?.cast<String>() ??
[];
} catch (e) {
rethrow;
}
}