From 8de3e0ff0b14296ac10622b56d023f501aa98f53 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Mon, 1 Aug 2016 13:42:41 -0500 Subject: [PATCH] Remove query parameters from the URL visible to the user --- modules/UI/UI.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 2fbb17fbb..722331d80 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -280,10 +280,15 @@ UI.setLocalRaisedHandStatus = (raisedHandStatus) => { */ UI.initConference = function () { let id = APP.conference.getMyUserId(); - Toolbar.updateRoomUrl( - // Do not include query parameters - // "https://example.com" + "/SomeConference1245" - window.location.origin + window.location.pathname); + + // Do not include query parameters in the invite URL + // "https://example.com" + "/SomeConference1245" + var inviteURL = window.location.origin + window.location.pathname; + Toolbar.updateRoomUrl(inviteURL); + // Clean up the URL displayed by the browser + if (window.history && typeof window.history.replaceState === 'function') { + window.history.replaceState({}, document.title, inviteURL); + } // Add myself to the contact list. ContactList.addContact(id);