Enforce config setting
This commit is contained in:
parent
3d89fc3bf2
commit
20a4f0af99
1 changed files with 5 additions and 3 deletions
|
@ -956,12 +956,14 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
this.showScreen("welcome");
|
this.showScreen("welcome");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const isMobileRegistrationAllowed =
|
||||||
|
isMobileRegistration && SettingsStore.getValue("Registration.mobileRegistrationHelper");
|
||||||
|
|
||||||
const newState: Partial<IState> = {
|
const newState: Partial<IState> = {
|
||||||
view: Views.REGISTER,
|
view: Views.REGISTER,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isMobileRegistration && params.hs_url) {
|
if (isMobileRegistrationAllowed && params.hs_url) {
|
||||||
try {
|
try {
|
||||||
const config = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(params.hs_url);
|
const config = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(params.hs_url);
|
||||||
newState.serverConfig = config;
|
newState.serverConfig = config;
|
||||||
|
@ -990,12 +992,12 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
newState.register_id_sid = params.sid;
|
newState.register_id_sid = params.sid;
|
||||||
}
|
}
|
||||||
|
|
||||||
newState.isMobileRegistration = isMobileRegistration; //&& SettingsStore.getValue("Registration.mobileRegistrationHelper");
|
newState.isMobileRegistration = isMobileRegistrationAllowed;
|
||||||
|
|
||||||
this.setStateForNewView(newState);
|
this.setStateForNewView(newState);
|
||||||
ThemeController.isLogin = true;
|
ThemeController.isLogin = true;
|
||||||
this.themeWatcher.recheck();
|
this.themeWatcher.recheck();
|
||||||
this.notifyNewScreen(isMobileRegistration ? "mobile_register" : "register");
|
this.notifyNewScreen(isMobileRegistrationAllowed ? "mobile_register" : "register");
|
||||||
}
|
}
|
||||||
|
|
||||||
// switch view to the given room
|
// switch view to the given room
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue