From 7a9298328f3ac0b2348177f6919c1bc1018deca1 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 16 Feb 2022 14:37:18 +0530 Subject: [PATCH] Return _type from getter --- src/matrix/registration/Registration.ts | 4 +--- src/matrix/registration/stages/TokenAuth.ts | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/matrix/registration/Registration.ts b/src/matrix/registration/Registration.ts index 8bfce8ad..ded66719 100644 --- a/src/matrix/registration/Registration.ts +++ b/src/matrix/registration/Registration.ts @@ -94,9 +94,7 @@ export class Registration { this._sessionInfo = response; return undefined; case 401: - // Support unstable prefix for TokenAuth - const typeFromServer = (currentStage as TokenAuth).typeFromServer; - if (response.completed?.includes(typeFromServer ?? currentStage.type)) { + if (response.completed?.includes(currentStage.type)) { return currentStage.nextStage; } else { diff --git a/src/matrix/registration/stages/TokenAuth.ts b/src/matrix/registration/stages/TokenAuth.ts index 607ee910..cb238bcb 100644 --- a/src/matrix/registration/stages/TokenAuth.ts +++ b/src/matrix/registration/stages/TokenAuth.ts @@ -43,10 +43,6 @@ export class TokenAuth extends BaseRegistrationStage { } get type(): string { - return "m.login.registration_token"; - } - - get typeFromServer(): string { return this._type; } }