isMemberInChatRoomAllowList method

Future<bool> isMemberInChatRoomAllowList(
  1. String roomId
)

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 ChatError.

Implementation

Future<bool> isMemberInChatRoomAllowList(String roomId) async {
  try {
    Map req = {"roomId": roomId};
    Map result = await platform_interface.Client.instance.chatRoomManager.callNativeMethod(
        ChatMethodKeys.isMemberInChatRoomWhiteListFromServer, req);
    ChatError.hasErrorFromResult(result);
    return result
        .boolValue(ChatMethodKeys.isMemberInChatRoomWhiteListFromServer);
  } catch (e) {
    rethrow;
  }
}