isMemberInChatRoomAllowList method

Future<bool> isMemberInChatRoomAllowList(
  1. String roomId
)

~english Checks whether the member is on the allow list.

Param roomId The chat room ID.

Return Whether the member is on the allow list.

  • true: Yes;
  • false: No. Throws A description of the exception. See EMError. ~end

~chinese 检查成员自己是否加入了白名单。

Param roomId 聊天室 ID。

Return 返回是否在白名单中:

  • true: 是;
  • false: 否。 Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError。 ~end

Implementation

Future<bool> isMemberInChatRoomAllowList(String roomId) async {
  Map req = {"roomId": roomId};
  Map result = await _channel.invokeMethod(
      ChatMethodKeys.isMemberInChatRoomWhiteListFromServer, req);

  try {
    EMError.hasErrorFromResult(result);
    return result
        .boolValue(ChatMethodKeys.isMemberInChatRoomWhiteListFromServer);
  } on EMError catch (e) {
    throw e;
  }
}