From e8127fc4ae9b326cb360616571512e6eb3d75c08 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 20 Jan 2021 21:00:59 +0100 Subject: [PATCH] Fix handling of remote maps --- front/src/Connexion/ConnectionManager.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts index 39f94677..552819bb 100644 --- a/front/src/Connexion/ConnectionManager.ts +++ b/front/src/Connexion/ConnectionManager.ts @@ -48,11 +48,10 @@ class ConnectionManager { } let roomId: string if (connexionType === GameConnexionTypes.empty) { - let defaultMapUrl = window.location.host.replace('play.', 'maps.') + URL_ROOM_STARTED; + roomId = urlManager.editUrlForRoom(URL_ROOM_STARTED, null, null); if (URL_ROOM_STARTED.startsWith('http://') || URL_ROOM_STARTED.startsWith('https://')) { - defaultMapUrl = URL_ROOM_STARTED.replace('http://', '').replace('https://', ''); + roomId = '/_/global/' + URL_ROOM_STARTED.replace('http://', '').replace('https://', ''); } - roomId = urlManager.editUrlForRoom(defaultMapUrl, null, null); } else { roomId = window.location.pathname + window.location.hash; }