diff --git a/src/vector/app.tsx b/src/vector/app.tsx index 5003051680..c405ed8a0d 100644 --- a/src/vector/app.tsx +++ b/src/vector/app.tsx @@ -73,6 +73,11 @@ function onNewScreen(screen: string, replaceLast = false) { const hash = '#/' + screen; lastLocationHashSet = hash; + // if the new hash is a substring of the old one then we are stripping fields e.g `via` so replace history + if (screen.startsWith("room/") && window.location.hash.startsWith(hash)) { + replaceLast = true; + } + if (replaceLast) { window.location.replace(hash); } else {