Changes the prefix added in front of the jitsiRoomName

Previously, the prefix was computed using the org/world (in SAAS) or the instance part of public URLs.
Neither was guaranteeing the Jitsi Room would be unique accross rooms.
The new system computes a hash of the room URL and prepends it to the jitsi room name.

BREAKING CHANGE: this means the URL of the Jitsi room will change for all maps. Users having bookmarked the Jitsi room (for instance in the Jitsi mobile app) will need to update their bookmarks.
This commit is contained in:
David Négrier
2022-04-15 21:12:00 +02:00
parent 184aeb354a
commit b89997c9f1
8 changed files with 26 additions and 28 deletions
@@ -67,7 +67,7 @@ export class GameMapPropertiesListener {
});
} else {
const openJitsiRoomFunction = () => {
const roomName = jitsiFactory.getRoomName(newValue.toString(), this.scene.instance);
const roomName = jitsiFactory.getRoomName(newValue.toString(), this.scene.roomUrl);
const jitsiUrl = allProps.get(GameMapProperties.JITSI_URL) as string | undefined;
if (JITSI_PRIVATE_MODE && !jitsiUrl) {
-2
View File
@@ -185,7 +185,6 @@ export class GameScene extends DirtyScene {
private biggestAvailableAreaStoreUnsubscribe!: () => void;
MapUrlFile: string;
roomUrl: string;
instance: string;
currentTick!: number;
lastSentTick!: number; // The last tick at which a position was sent.
@@ -234,7 +233,6 @@ export class GameScene extends DirtyScene {
});
this.Terrains = [];
this.groups = new Map<number, Sprite>();
this.instance = room.instance;
this.MapUrlFile = MapUrlFile;
this.roomUrl = room.key;