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

Commit

Permalink
Remove leading slash from /addwidget Jitsi confs (#7175)
Browse files Browse the repository at this point in the history
* Remove leading slash from /addwidget Jitsi confs

Fixes element-hq/element-web#19839

Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net>

* Make requested changes

Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net>
  • Loading branch information
AndrewFerr authored Nov 23, 2021
1 parent 925136d commit a8a34ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/widgets/Jitsi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export class Jitsi {
const parsed = new URL(url);
if (parsed.hostname !== this.preferredDomain) return null; // invalid
return {
conferenceId: parsed.pathname,
// URL pathnames always contain a leading slash.
// Remove it to be left with just the conference name.
conferenceId: parsed.pathname.substring(1),
domain: parsed.hostname,
isAudioOnly: false,
};
Expand Down

0 comments on commit a8a34ea

Please sign in to comment.