Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 2e0b5bb

Browse files
authored
Fix edge case of landing on 3pid email link with registration disabled (#12771)
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 3221f7c commit 2e0b5bb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/structures/MatrixChat.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,10 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
551551
.then((loadedSession) => {
552552
if (!loadedSession) {
553553
// fall back to showing the welcome screen... unless we have a 3pid invite pending
554-
if (ThreepidInviteStore.instance.pickBestInvite()) {
554+
if (
555+
ThreepidInviteStore.instance.pickBestInvite() &&
556+
SettingsStore.getValue(UIFeature.Registration)
557+
) {
555558
dis.dispatch({ action: "start_registration" });
556559
} else {
557560
dis.dispatch({ action: "view_welcome_page" });
@@ -951,6 +954,11 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
951954
}
952955

953956
private async startRegistration(params: { [key: string]: string }): Promise<void> {
957+
if (!SettingsStore.getValue(UIFeature.Registration)) {
958+
this.showScreen("welcome");
959+
return;
960+
}
961+
954962
const newState: Partial<IState> = {
955963
view: Views.REGISTER,
956964
};

0 commit comments

Comments
 (0)