From 9eef3c53a340c9af3a1582283a4f35daeb8a3034 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 20 Feb 2017 16:53:26 +0000 Subject: [PATCH] Allow setting the default HS from the query parameter Fixes https://github.com/vector-im/riot-web/issues/3207 --- src/components/structures/MatrixChat.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 3265249105..e885614ffe 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -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() {