isMemberInAllowListFromServer method

Future<bool> isMemberInAllowListFromServer(
  1. String groupId
)

~english Gets whether the member is on the allow list of the group.

Param groupId The group ID.

Return A Boolean value to indicate whether the current user is on the allow list of the group;

Throws A description of the exception. See ChatError. ~end

~chinese 检查当前用户是否在群组白名单中。

Param groupId 群组 ID。

Return 是否在群组白名单。

  • true: 是;
  • false: 否。

Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。 ~end

Implementation

Future<bool> isMemberInAllowListFromServer(String groupId) async {
  Map req = {'groupId': groupId};
  Map result = await _channel.invokeMethod(
      ChatMethodKeys.isMemberInWhiteListFromServer, req);
  try {
    ChatError.hasErrorFromResult(result);
    return result.boolValue(ChatMethodKeys.isMemberInWhiteListFromServer);
  } on ChatError catch (e) {
    throw e;
  }
}