From b1cdf1bc9a2745f4b75f81563153c361e319ade9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 11 Sep 2020 19:53:52 -0600 Subject: [PATCH] Redirect to the registration page if there's a 3PID invite Fixes https://github.com/vector-im/element-web/issues/15130 --- src/components/structures/MatrixChat.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 13e0c21858..787b1a44e3 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -413,8 +413,12 @@ export default class MatrixChat extends React.PureComponent { }); }).then((loadedSession) => { if (!loadedSession) { - // fall back to showing the welcome screen - dis.dispatch({action: "view_welcome_page"}); + // fall back to showing the welcome screen... unless we have a 3pid invite pending + if (ThreepidInviteStore.instance.pickBestInvite()) { + dis.dispatch({action: 'start_registration'}); + } else { + dis.dispatch({action: "view_welcome_page"}); + } } }); // Note we don't catch errors from this: we catch everything within