diff options
author | Christoph Settgast <csett86@web.de> | 2022-02-09 07:34:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-09 07:34:46 +0100 |
commit | 9601ef83f32d6afc972089e0eeda19902256714a (patch) | |
tree | c606a38cf29658c4923c91c653e33fd1ae6b0b51 | |
parent | 5e312141429bc213a3435d32153853326a67528e (diff) |
feat: allow the jitsi-meet:// protocol in the URL box (#706)
* feat: allow the jitsi-meet:// protocol in the URL box
Allow this so that when you send around links to the app and someone
accidentally copy-pastes them into the URL box, things dont break.
-rw-r--r-- | app/features/conference/components/Conference.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js index cf7a2e2..0a9f058 100644 --- a/app/features/conference/components/Conference.js +++ b/app/features/conference/components/Conference.js @@ -168,6 +168,12 @@ class Conference extends Component<Props, State> { * @returns {void} */ _loadConference() { + const appProtocolSurplus = `${config.appProtocolPrefix}://`; + + // replace the custom url with https, otherwise new URL() raises 'Invalid URL'. + if (this._conference.serverURL.startsWith(appProtocolSurplus)) { + this._conference.serverURL = this._conference.serverURL.replace(appProtocolSurplus, 'https://'); + } const url = new URL(this._conference.room, this._conference.serverURL); const roomName = url.pathname.split('/').pop(); const host = this._conference.serverURL.replace(/https?:\/\//, ''); |