Skip to content

Commit 379fed8

Browse files
committed
actually use the config file for default HS and IS URLs...
1 parent 1188c4c commit 379fed8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/skins/vector/views/templates/Register.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ var Loader = require("react-loader");
2525

2626
var RegisterController = require('../../../../controllers/templates/Register')
2727

28-
module.exports = React.createClass({
29-
DEFAULT_HS_URL: 'https://matrix.org',
30-
DEFAULT_IS_URL: 'https://vector.im',
28+
var config = require('../../../../../config.json');
3129

30+
module.exports = React.createClass({
3231
displayName: 'Register',
3332
mixins: [RegisterController],
3433

@@ -39,8 +38,8 @@ module.exports = React.createClass({
3938
},
4039

4140
componentWillMount: function() {
42-
this.customHsUrl = this.DEFAULT_HS_URL;
43-
this.customIsUrl = this.DEFAULT_IS_URL;
41+
this.customHsUrl = config.default_hs_url;
42+
this.customIsUrl = config.default_is_url;
4443
},
4544

4645
getRegFormVals: function() {
@@ -56,15 +55,15 @@ module.exports = React.createClass({
5655
if (this.state.serverConfigVisible) {
5756
return this.customHsUrl;
5857
} else {
59-
return this.DEFAULT_HS_URL;
58+
return config.default_hs_url;
6059
}
6160
},
6261

6362
getIsUrl: function() {
6463
if (this.state.serverConfigVisible) {
6564
return this.customIsUrl;
6665
} else {
67-
return this.DEFAULT_IS_URL;
66+
return config.default_is_url;
6867
}
6968
},
7069

0 commit comments

Comments
 (0)