isMemberInChatRoomAllowList method
~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. SeeChatError. ~end
~chinese 检查成员自己是否加入了白名单。
Param roomId 聊天室 ID。
Return 返回是否在白名单中:
true: 是;false: 否。 Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见ChatError。 ~end
Implementation
Future<bool> isMemberInChatRoomAllowList(String roomId) async {
Map req = {"roomId": roomId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.isMemberInChatRoomWhiteListFromServer,
req,
);
try {
ChatError.hasErrorFromResult(result);
return result.boolValue(
ChatMethodKeys.isMemberInChatRoomWhiteListFromServer,
);
} on ChatError catch (e) {
throw e;
}
}