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:
@@ -76,10 +76,6 @@ export class MapController extends BaseHttpController {
|
||||
* type: string|null
|
||||
* description: The group this room is part of (maps the notion of "world" in WorkAdventure SAAS)
|
||||
* example: myorg/myworld
|
||||
* instance:
|
||||
* type: string
|
||||
* description: The instance of this map. In a public URL: the second part of the URL (_/[instance]/map.json)
|
||||
* example: global
|
||||
* iframeAuthentication:
|
||||
* type: string|null
|
||||
* description: The URL of the authentication Iframe
|
||||
@@ -115,15 +111,14 @@ export class MapController extends BaseHttpController {
|
||||
if (!ADMIN_API_URL) {
|
||||
const roomUrl = new URL(query.playUri);
|
||||
|
||||
const match = /\/_\/([^/]+)\/(.+)/.exec(roomUrl.pathname);
|
||||
const match = /\/_\/[^/]+\/(.+)/.exec(roomUrl.pathname);
|
||||
if (!match) {
|
||||
res.status(404);
|
||||
res.json({});
|
||||
return;
|
||||
}
|
||||
|
||||
const instance = match[1];
|
||||
const mapUrl = roomUrl.protocol + "//" + match[2];
|
||||
const mapUrl = roomUrl.protocol + "//" + match[1];
|
||||
|
||||
res.json({
|
||||
mapUrl,
|
||||
@@ -133,7 +128,6 @@ export class MapController extends BaseHttpController {
|
||||
tags: [],
|
||||
contactPage: null,
|
||||
authenticationMandatory: DISABLE_ANONYMOUS,
|
||||
instance,
|
||||
} as MapDetailsData);
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user