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

Remove leading slash from /addwidget Jitsi confs #7175

Merged
merged 2 commits into from
Nov 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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