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:
@@ -562,14 +562,13 @@ export class GameRoom {
|
||||
if (!ADMIN_API_URL) {
|
||||
const roomUrlObj = new URL(roomUrl);
|
||||
|
||||
const match = /\/_\/([^/]+)\/(.+)/.exec(roomUrlObj.pathname);
|
||||
const match = /\/_\/[^/]+\/(.+)/.exec(roomUrlObj.pathname);
|
||||
if (!match) {
|
||||
console.error("Unexpected room URL", roomUrl);
|
||||
throw new Error('Unexpected room URL "' + roomUrl + '"');
|
||||
}
|
||||
|
||||
const instance = match[1];
|
||||
const mapUrl = roomUrlObj.protocol + "//" + match[2];
|
||||
const mapUrl = roomUrlObj.protocol + "//" + match[1];
|
||||
|
||||
return {
|
||||
mapUrl,
|
||||
@@ -579,7 +578,6 @@ export class GameRoom {
|
||||
roomSlug: null,
|
||||
contactPage: null,
|
||||
group: null,
|
||||
instance,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user