From c8868a393b2578778749fda52e588735b61624e3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 13 Mar 2017 17:51:59 +0000 Subject: [PATCH] Add x_show_msisdn parameter to rregister calls Request the msisdn stages in the rtegister UI auth, as commented --- src/base-apis.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/base-apis.js b/src/base-apis.js index 3771e750386..fdc194ba941 100644 --- a/src/base-apis.js +++ b/src/base-apis.js @@ -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); };