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

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

591
 
591
 
592
     return url;
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
 
4
 
5
 import { translate } from '../../../../base/i18n';
5
 import { translate } from '../../../../base/i18n';
6
 import { Icon, IconCheck, IconCopy } from '../../../../base/icons';
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
 type Props = {
10
 type Props = {
82
             );
82
             );
83
         }
83
         }
84
 
84
 
85
-        const displayUrl = decodeURI(url.replace(/^https?:\/\//i, ''));
85
+        const displayUrl = getDecodedURI(url);
86
 
86
 
87
         return (
87
         return (
88
             <>
88
             <>

Loading…
Cancel
Save