Change how the default server name and HS URL interact

They are now independent of each other. If both are specified in the config, the user will see an error and be prevented from logging in. The expected behaviour is that when a default server name is given, we do a .well-known lookup to find the default homeserver (and block the UI while we do this to prevent it from using matrix.org while we go out and find more information). If the config specifies just a default homeserver URL however, we don't do anything special.
This commit is contained in:
Travis Ralston 2018-12-07 15:36:49 -07:00
parent 0a32570026
commit 6707186edc
5 changed files with 24 additions and 27 deletions

View file

@ -470,9 +470,6 @@ module.exports = React.createClass({
_renderPasswordStep: function() {
const PasswordLogin = sdk.getComponent('login.PasswordLogin');
const hsName = this.state.enteredHomeserverUrl === this.props.defaultHsUrl
? this.props.defaultServerName
: null;
return (
<PasswordLogin
onSubmit={this.onPasswordLogin}
@ -487,7 +484,7 @@ module.exports = React.createClass({
onForgotPasswordClick={this.props.onForgotPasswordClick}
loginIncorrect={this.state.loginIncorrect}
hsUrl={this.state.enteredHomeserverUrl}
hsName={hsName}
hsName={this.props.defaultServerName}
/>
);
},