mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
specify a brand when registering accounts
This commit is contained in:
parent
0ef0120227
commit
83fd02bdfa
3 changed files with 9 additions and 1 deletions
|
@ -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");
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue