Skip to content

Commit

Permalink
Merge pull request #388 from matrix-org/dbkr/x_show_msisdn
Browse files Browse the repository at this point in the history
Add x_show_msisdn parameter to register calls
  • Loading branch information
dbkr authored Mar 21, 2017
2 parents 89de1f9 + 571fcbe commit 1b0f22c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/base-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ MatrixBaseApis.prototype.register = function(
if (guestAccessToken !== undefined && guestAccessToken !== null) {
params.guest_access_token = guestAccessToken;
}
// Temporary parameter added to make the register endpoint advertise
// msisdn flows. This exists because there are clients that break
// when given stages they don't recognise. This parameter will cease
// to be necessary once these old clients are gone.
// Only send it if we send any params at all (the password param is
// mandatory, so if we send any params, we'll send the password param)
if (password !== undefined && password !== null) {
params.x_show_msisdn = true;
}

return this.registerRequest(params, undefined, callback);
};
Expand Down

0 comments on commit 1b0f22c

Please sign in to comment.