mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 09:15:41 +03:00
Fix edge case of landing on 3pid email link with registration disabled (#12771)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
3221f7cade
commit
2e0b5bb462
1 changed files with 9 additions and 1 deletions
|
@ -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" });
|
||||
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue