Allow setting the default HS from the query parameter

Fixes https://github.com/vector-im/riot-web/issues/3207
pull/21833/head
Luke Barnard 2017-02-20 16:53:26 +00:00
parent 7d07e7f958
commit 9eef3c53a3
1 changed files with 9 additions and 0 deletions

View File

@ -226,6 +226,15 @@ module.exports = React.createClass({
if (this._teamToken) {
console.info(`Team token set to ${this._teamToken}`);
}
// Set a default HS with query param `hs_url`
const paramHs = this.props.startingFragmentQueryParams.hs_url;
if (paramHs) {
console.log('Setting register_hs_url ', paramHs);
this.setState({
register_hs_url: paramHs,
});
}
},
componentDidMount: function() {