1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Replace {} with null to be compliant with newer specs. While older also accepted null for the auth part of the registration request object

This commit is contained in:
Marcel
2020-04-06 15:22:04 +02:00
parent 275a8175aa
commit ed8d064a13
2 changed files with 1 additions and 4 deletions

View File

@@ -206,9 +206,6 @@ MatrixBaseApis.prototype.register = function(
inhibitLogin = undefined;
}
if (auth === undefined || auth === null) {
auth = {};
}
if (sessionId) {
auth.session = sessionId;
}

View File

@@ -104,7 +104,7 @@ const MSISDN_STAGE_TYPE = "m.login.msisdn";
*/
export function InteractiveAuth(opts) {
this._matrixClient = opts.matrixClient;
this._data = opts.authData || {};
this._data = opts.authData || null;
this._requestCallback = opts.doRequest;
this._busyChangedCallback = opts.busyChanged;
// startAuthStage included for backwards compat