From e8700392b509511ba207a503a2f07343ca8fc4e7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 15 Jul 2020 10:16:04 +0100 Subject: [PATCH] Fix pathname for riot.im redirects Need to redirect to root on x.element.io --- src/RebrandListener.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RebrandListener.tsx b/src/RebrandListener.tsx index 077ff7a2f3..8a0c61f435 100644 --- a/src/RebrandListener.tsx +++ b/src/RebrandListener.tsx @@ -40,10 +40,13 @@ function getRedirectUrl(url): string { } else if (url.hostname === 'riot.im') { if (url.pathname.startsWith('/app')) { redirectUrl.hostname = 'app.element.io'; + redirectUrl.pathname = '/'; } else if (url.pathname.startsWith('/staging')) { redirectUrl.hostname = 'staging.element.io'; + redirectUrl.pathname = '/'; } else if (url.pathname.startsWith('/develop')) { redirectUrl.hostname = 'develop.element.io'; + redirectUrl.pathname = '/'; } return redirectUrl.href;