1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

Merge pull request #388 from matrix-org/dbkr/x_show_msisdn

Add x_show_msisdn parameter to register calls
This commit is contained in:
David Baker
2017-03-21 13:41:34 +00:00
committed by GitHub

View File

@@ -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);
};