isMemberInAllowListFromServer method
- String groupId
~english Checks whether the current user is on the group allowlist.
Param groupId The group ID.
Returns True if the current user is in the allowlist, false otherwise.
Throws Exception description, see EMError. ~end
~chinese 查看当前用户是否在群组白名单中。
Param groupId 群组 ID。
Return 是否在白名单中:true 是,false 否。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError. ~end
Implementation
Future<bool> isMemberInAllowListFromServer(String groupId) async {
try {
Map req = {'groupId': groupId};
Map result = await Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.isMemberInWhiteListFromServer, req);
EMError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.isMemberInWhiteListFromServer);
} catch (e) {
rethrow;
}
}