External API update (#2111)

* External API update

 - Remove tags field for map information
 - Remove room_policy fiels for map information

This two paramter will be used directly in the admin

* Delete use less updateRoomWithAdminData

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
This commit is contained in:
grégoire parant
2022-04-25 11:00:01 +02:00
committed by GitHub
parent 03edc197d3
commit f402fea86a
6 changed files with 4 additions and 54 deletions
@@ -1,5 +1,4 @@
import { ExSocketInterface } from "../Model/Websocket/ExSocketInterface";
import { GameRoomPolicyTypes } from "../Model/PusherRoom";
import { PointInterface } from "../Model/Websocket/PointInterface";
import {
SetPlayerDetailsMessage,
@@ -296,7 +295,6 @@ export class IoSocketController {
let memberMessages: unknown;
let memberUserRoomToken: string | undefined;
let memberTextures: WokaDetail[] = [];
const room = await socketManager.getOrCreateRoom(roomId);
let userData: FetchMemberDataByUuidResponse = {
email: userIdentifier,
userUuid: userIdentifier,
@@ -359,20 +357,6 @@ export class IoSocketController {
memberVisitCardUrl = userData.visitCardUrl;
memberTextures = userData.textures;
memberUserRoomToken = userData.userRoomToken;
if (
room.policyType === GameRoomPolicyTypes.USE_TAGS_POLICY &&
(userData.anonymous === true || !room.canAccess(memberTags))
) {
throw new Error("Insufficient privileges to access this room");
}
if (
room.policyType === GameRoomPolicyTypes.MEMBERS_ONLY_POLICY &&
userData.anonymous === true
) {
throw new Error("Use the login URL to connect");
}
characterLayerObjs = memberTextures;
} catch (e) {
console.log(