Browse Source

fix(prejoin): Show decoded version of meeting uri

master
Vlad Piersec 5 years ago
parent
commit
ef0af1a8c0

+ 2
- 2
react/features/base/premeeting/components/web/CopyMeetingUrl.js View File

@@ -6,7 +6,7 @@ import { getCurrentConferenceUrl } from '../../../connection';
6 6
 import { translate } from '../../../i18n';
7 7
 import { Icon, IconCopy, IconCheck } from '../../../icons';
8 8
 import { connect } from '../../../redux';
9
-import { copyText } from '../../../util';
9
+import { copyText, getDecodedURI } from '../../../util';
10 10
 
11 11
 type Props = {
12 12
 
@@ -156,7 +156,7 @@ class CopyMeetingUrl extends Component<Props, State> {
156 156
                     className = { `url ${showLinkCopied ? 'done' : ''}` }
157 157
                     onClick = { _copyUrl } >
158 158
                     <div className = 'copy-meeting-text'>
159
-                        { !showCopyLink && !showLinkCopied && url }
159
+                        { !showCopyLink && !showLinkCopied && getDecodedURI(url) }
160 160
                         { showCopyLink && t('prejoin.copyAndShare') }
161 161
                         { showLinkCopied && t('prejoin.linkCopied') }
162 162
                     </div>

+ 10
- 0
react/features/base/util/uri.js View File

@@ -591,3 +591,13 @@ export function addHashParamsToURL(url: URL, hashParamsToAdd: Object = {}) {
591 591
 
592 592
     return url;
593 593
 }
594
+
595
+/**
596
+ * Returns the decoded URI.
597
+ *
598
+ * @param {string} uri - The URI to decode.
599
+ * @returns {string}
600
+ */
601
+export function getDecodedURI(uri: string) {
602
+    return decodeURI(uri.replace(/^https?:\/\//i, ''));
603
+}

+ 2
- 2
react/features/invite/components/add-people-dialog/web/CopyMeetingLinkSection.js View File

@@ -4,7 +4,7 @@ import React, { useState } from 'react';
4 4
 
5 5
 import { translate } from '../../../../base/i18n';
6 6
 import { Icon, IconCheck, IconCopy } from '../../../../base/icons';
7
-import { copyText } from '../../../../base/util';
7
+import { copyText, getDecodedURI } from '../../../../base/util';
8 8
 
9 9
 
10 10
 type Props = {
@@ -82,7 +82,7 @@ function CopyMeetingLinkSection({ t, url }: Props) {
82 82
             );
83 83
         }
84 84
 
85
-        const displayUrl = decodeURI(url.replace(/^https?:\/\//i, ''));
85
+        const displayUrl = getDecodedURI(url);
86 86
 
87 87
         return (
88 88
             <>

Loading…
Cancel
Save