Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a8a34ea

Browse files
authored
Remove leading slash from /addwidget Jitsi confs (#7175)
* Remove leading slash from /addwidget Jitsi confs Fixes element-hq/element-web#19839 Signed-off-by: Andrew Ferrazzutti <[email protected]> * Make requested changes Signed-off-by: Andrew Ferrazzutti <[email protected]>
1 parent 925136d commit a8a34ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/widgets/Jitsi.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ export class Jitsi {
9292
const parsed = new URL(url);
9393
if (parsed.hostname !== this.preferredDomain) return null; // invalid
9494
return {
95-
conferenceId: parsed.pathname,
95+
// URL pathnames always contain a leading slash.
96+
// Remove it to be left with just the conference name.
97+
conferenceId: parsed.pathname.substring(1),
9698
domain: parsed.hostname,
9799
isAudioOnly: false,
98100
};

0 commit comments

Comments
 (0)