You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Set referrer qp in nextLink
This is so that when the verification link is clicked from an email, the referrer is set on the new instance of riot when /rts/register is hit
This commit is contained in:
@ -91,6 +91,10 @@ class Register extends Signup {
|
|||||||
this.params.idSid = idSid;
|
this.params.idSid = idSid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setReferrer(referrer) {
|
||||||
|
this.params.referrer = referrer;
|
||||||
|
}
|
||||||
|
|
||||||
setGuestAccessToken(token) {
|
setGuestAccessToken(token) {
|
||||||
this.guestAccessToken = token;
|
this.guestAccessToken = token;
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,11 @@ class EmailIdentityStage extends Stage {
|
|||||||
"&session_id=" +
|
"&session_id=" +
|
||||||
encodeURIComponent(this.signupInstance.getServerData().session);
|
encodeURIComponent(this.signupInstance.getServerData().session);
|
||||||
|
|
||||||
|
// Add the user ID of the referring user, if set
|
||||||
|
if (this.signupInstance.params.referrer) {
|
||||||
|
nextLink += "&referrer=" + encodeURIComponent(this.signupInstance.params.referrer);
|
||||||
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
return this.client.requestRegisterEmailToken(
|
return this.client.requestRegisterEmailToken(
|
||||||
this.signupInstance.email,
|
this.signupInstance.email,
|
||||||
|
@ -98,6 +98,9 @@ module.exports = React.createClass({
|
|||||||
this.registerLogic.setRegistrationUrl(this.props.registrationUrl);
|
this.registerLogic.setRegistrationUrl(this.props.registrationUrl);
|
||||||
this.registerLogic.setIdSid(this.props.idSid);
|
this.registerLogic.setIdSid(this.props.idSid);
|
||||||
this.registerLogic.setGuestAccessToken(this.props.guestAccessToken);
|
this.registerLogic.setGuestAccessToken(this.props.guestAccessToken);
|
||||||
|
if (this.props.referrer) {
|
||||||
|
this.registerLogic.setReferrer(this.props.referrer);
|
||||||
|
}
|
||||||
this.registerLogic.recheckState();
|
this.registerLogic.recheckState();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
Reference in New Issue
Block a user