diff --git a/src/Signup.js b/src/Signup.js index 4518955d95..c4fce88262 100644 --- a/src/Signup.js +++ b/src/Signup.js @@ -51,6 +51,7 @@ class Register extends Signup { this.username = undefined; // desired this.email = undefined; // desired this.password = undefined; // desired + this.brand = undefined; // optional brand to let the HS brand its mail notifs } setClientSecret(secret) { @@ -73,6 +74,10 @@ class Register extends Signup { this.guestAccessToken = token; } + setBrand(brand) { + this.brand = brand; + } + getStep() { return this._step; } @@ -131,7 +136,7 @@ class Register extends Signup { return MatrixClientPeg.get().register( this.username, this.password, this.params.sessionId, authDict, bindEmail, - this.guestAccessToken + this.guestAccessToken, this.brand ).then(function(result) { self.credentials = result; self.setStep("COMPLETE"); diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 8ee395a218..f708a3e0fb 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1160,6 +1160,7 @@ module.exports = React.createClass({ guestAccessToken={this.state.guestAccessToken} defaultHsUrl={this.props.config.default_hs_url} defaultIsUrl={this.props.config.default_is_url} + brand={this.props.config.brand} customHsUrl={this.getCurrentHsUrl()} customIsUrl={this.getCurrentIsUrl()} registrationUrl={this.props.registrationUrl} diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index d852991b9c..e1b3780435 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -40,6 +40,7 @@ module.exports = React.createClass({ customIsUrl: React.PropTypes.string, defaultHsUrl: React.PropTypes.string, defaultIsUrl: React.PropTypes.string, + brand: React.PropTypes.string, email: React.PropTypes.string, username: React.PropTypes.string, guestAccessToken: React.PropTypes.string, @@ -66,6 +67,7 @@ module.exports = React.createClass({ this.registerLogic.setRegistrationUrl(this.props.registrationUrl); this.registerLogic.setIdSid(this.props.idSid); this.registerLogic.setGuestAccessToken(this.props.guestAccessToken); + this.registerLogic.setBrand(this.props.brand); this.registerLogic.recheckState(); },