Fix registration with email + non-default HS
We were ignoring the hs/is from the query parameters so after clicking the link, the new client tried to use the wrong server. Broken by https://github.com/matrix-org/matrix-react-sdk/pull/2941 Fixes https://github.com/vector-im/riot-web/issues/9659
This commit is contained in:
parent
c425eb83ca
commit
10377b42e9
1 changed files with 13 additions and 1 deletions
|
@ -219,6 +219,18 @@ export default React.createClass({
|
||||||
return {serverConfig: props};
|
return {serverConfig: props};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getRegisterServerProperties() {
|
||||||
|
const props = this.getServerProperties();
|
||||||
|
if (this.state.register_hs_url) {
|
||||||
|
props.hsUrl = this.state.register_hs_url;
|
||||||
|
}
|
||||||
|
if (this.state.register_is_url) {
|
||||||
|
props.isUrl = this.state.register_is_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {serverConfig: props};
|
||||||
|
},
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
SdkConfig.put(this.props.config);
|
SdkConfig.put(this.props.config);
|
||||||
|
|
||||||
|
@ -1871,7 +1883,7 @@ export default React.createClass({
|
||||||
onLoggedIn={this.onRegistered}
|
onLoggedIn={this.onRegistered}
|
||||||
onLoginClick={this.onLoginClick}
|
onLoginClick={this.onLoginClick}
|
||||||
onServerConfigChange={this.onServerConfigChange}
|
onServerConfigChange={this.onServerConfigChange}
|
||||||
{...this.getServerProperties()}
|
{...this.getRegisterServerProperties()}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue