From 1a1c4e35474234da7094778aa5f63c42793ea748 Mon Sep 17 00:00:00 2001 From: "Louis Wicket (wil)" Date: Wed, 6 Oct 2021 15:33:49 +0000 Subject: [PATCH] [IMP] mail: keep url params in discuss public view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will change the way URLs are edited in discuss public view to preserve URL params in the resulting URL. Context: In order to avoid leaking invitation links, URLs are modified in discuss public view, but this can sometimes hide precious information such as the debug mode from the URL. closes odoo/odoo#78019 X-original-commit: 0a3b31c615bb319b4e0d9304e034df3520e8f33c Signed-off-by: Sébastien Theys (seb) --- .../src/models/discuss_public_view/discuss_public_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/models/discuss_public_view/discuss_public_view.js b/addons/mail/static/src/models/discuss_public_view/discuss_public_view.js index dbf0353b5a1..aa808e40671 100644 --- a/addons/mail/static/src/models/discuss_public_view/discuss_public_view.js +++ b/addons/mail/static/src/models/discuss_public_view/discuss_public_view.js @@ -28,7 +28,7 @@ function factory(dependencies) { }); if (this.isChannelTokenSecret) { // Change the URL to avoid leaking the invitation link. - window.history.replaceState(window.history.state, null, `/discuss/channel/${this.channel.id}`); + window.history.replaceState(window.history.state, null, `/discuss/channel/${this.channel.id}${window.location.search}`); } if (this.channel.defaultDisplayMode === 'video_full_screen') { await this.channel.toggleCall({ startWithVideo: true });