Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(prejoin): Show decoded version of meeting uri

Vlad Piersecef0af1a8c006
diff --git a/react/features/base/premeeting/components/web/CopyMeetingUrl.js b/react/features/base/premeeting/components/web/CopyMeetingUrl.js
index 7725ab4264..ed956ea22f 100644
--- a/react/features/base/premeeting/components/web/CopyMeetingUrl.js
+++ b/react/features/base/premeeting/components/web/CopyMeetingUrl.js
@@ -6,7 +6,7 @@ import { getCurrentConferenceUrl } from '../../../connection';
import { translate } from '../../../i18n';
import { Icon, IconCopy, IconCheck } from '../../../icons';
import { connect } from '../../../redux';
-import { copyText } from '../../../util';
+import { copyText, getDecodedURI } from '../../../util';
type Props = {
@@ -156,7 +156,7 @@ class CopyMeetingUrl extends Component<Props, State> {
className = { `url ${showLinkCopied ? 'done' : ''}` }
onClick = { _copyUrl } >
<div className = 'copy-meeting-text'>
- { !showCopyLink && !showLinkCopied && url }
+ { !showCopyLink && !showLinkCopied && getDecodedURI(url) }
{ showCopyLink && t('prejoin.copyAndShare') }
{ showLinkCopied && t('prejoin.linkCopied') }
</div>
diff --git a/react/features/base/util/uri.js b/react/features/base/util/uri.js
index 4ecaa85894..7e099c2af7 100644
--- a/react/features/base/util/uri.js
+++ b/react/features/base/util/uri.js
@@ -591,3 +591,13 @@ export function addHashParamsToURL(url: URL, hashParamsToAdd: Object = {}) {
return url;
}
+
+/**
+ * Returns the decoded URI.
+ *
+ * @param {string} uri - The URI to decode.
+ * @returns {string}
+ */
+export function getDecodedURI(uri: string) {
+ return decodeURI(uri.replace(/^https?:\/\//i, ''));
+}
diff --git a/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js b/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js
index baacd2db7d..6dc327d80f 100644
--- a/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js
+++ b/react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
import { translate } from '../../../../base/i18n';
import { Icon, IconCheck, IconCopy } from '../../../../base/icons';
-import { copyText } from '../../../../base/util';
+import { copyText, getDecodedURI } from '../../../../base/util';
type Props = {
@@ -82,7 +82,7 @@ function CopyMeetingLinkSection({ t, url }: Props) {
);
}
- const displayUrl = decodeURI(url.replace(/^https?:\/\//i, ''));
+ const displayUrl = getDecodedURI(url);
return (
<>