Skip to content

Commit

Permalink
Fix edge case of landing on 3pid email link with registration disable…
Browse files Browse the repository at this point in the history
…d (#12771)

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy authored Jul 15, 2024
1 parent 3221f7c commit 2e0b5bb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,10 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
.then((loadedSession) => {
if (!loadedSession) {
// fall back to showing the welcome screen... unless we have a 3pid invite pending
if (ThreepidInviteStore.instance.pickBestInvite()) {
if (
ThreepidInviteStore.instance.pickBestInvite() &&
SettingsStore.getValue(UIFeature.Registration)
) {
dis.dispatch({ action: "start_registration" });
} else {
dis.dispatch({ action: "view_welcome_page" });
Expand Down Expand Up @@ -951,6 +954,11 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
}

private async startRegistration(params: { [key: string]: string }): Promise<void> {
if (!SettingsStore.getValue(UIFeature.Registration)) {
this.showScreen("welcome");
return;
}

const newState: Partial<IState> = {
view: Views.REGISTER,
};
Expand Down

0 comments on commit 2e0b5bb

Please sign in to comment.