mirror of https://github.com/vector-im/riot-web
Fix edge case of landing on 3pid email link with registration disabled (#12771)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/28217/head
parent
3221f7cade
commit
2e0b5bb462
|
@ -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 New Issue