Преглед изворни кода

Remove query parameters from the URL visible to the user

j8
paweldomas пре 9 година
родитељ
комит
8de3e0ff0b
1 измењених фајлова са 9 додато и 4 уклоњено
  1. 9
    4
      modules/UI/UI.js

+ 9
- 4
modules/UI/UI.js Прегледај датотеку

@@ -280,10 +280,15 @@ UI.setLocalRaisedHandStatus = (raisedHandStatus) => {
280 280
  */
281 281
 UI.initConference = function () {
282 282
     let id = APP.conference.getMyUserId();
283
-    Toolbar.updateRoomUrl(
284
-        // Do not include query parameters
285
-        // "https://example.com" + "/SomeConference1245"
286
-        window.location.origin + window.location.pathname);
283
+
284
+    // Do not include query parameters in the invite URL
285
+    // "https://example.com" + "/SomeConference1245"
286
+    var inviteURL = window.location.origin + window.location.pathname;
287
+    Toolbar.updateRoomUrl(inviteURL);
288
+    // Clean up the URL displayed by the browser
289
+    if (window.history && typeof window.history.replaceState === 'function') {
290
+        window.history.replaceState({}, document.title, inviteURL);
291
+    }
287 292
 
288 293
     // Add myself to the contact list.
289 294
     ContactList.addContact(id);

Loading…
Откажи
Сачувај