From 787e9feeff4071be4f3c3d02779ffaf8d2066dc4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 9 Aug 2019 15:34:03 +0100 Subject: [PATCH] Get rid of support for legacy login params Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/Login.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Login.js b/src/Login.js index c31a9308a8..d9ce8adaaa 100644 --- a/src/Login.js +++ b/src/Login.js @@ -2,6 +2,7 @@ Copyright 2015, 2016 OpenMarket Ltd Copyright 2017 Vector Creations Ltd Copyright 2018 New Vector Ltd +Copyright 2019 Michael Telatynski <7t3chguy@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -87,32 +88,23 @@ export default class Login { const isEmail = username.indexOf("@") > 0; let identifier; - let legacyParams; // parameters added to support old HSes if (phoneCountry && phoneNumber) { identifier = { type: 'm.id.phone', country: phoneCountry, number: phoneNumber, }; - // No legacy support for phone number login } else if (isEmail) { identifier = { type: 'm.id.thirdparty', medium: 'email', address: username, }; - legacyParams = { - medium: 'email', - address: username, - }; } else { identifier = { type: 'm.id.user', user: username, }; - legacyParams = { - user: username, - }; } const loginParams = { @@ -120,7 +112,6 @@ export default class Login { identifier: identifier, initial_device_display_name: this._defaultDeviceDisplayName, }; - Object.assign(loginParams, legacyParams); const tryFallbackHs = (originalError) => { return sendLoginRequest(