From 351a22cb3c9a6f6d9717e0b77c91cf46fb840d45 Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Mon, 6 Sep 2021 12:52:40 +0500 Subject: [PATCH] fix: deriving username with full name --- src/auth/AuthManager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auth/AuthManager.ts b/src/auth/AuthManager.ts index f7dc47c..6d7de88 100644 --- a/src/auth/AuthManager.ts +++ b/src/auth/AuthManager.ts @@ -176,11 +176,12 @@ export class AuthManager { switch (this.serverType) { case ServerType.SasViya: return response?.id + case ServerType.Sas9: const matched = response?.match(/"title":"Log Off [0-1a-zA-Z ]*"/) const username = matched?.[0].slice(17, -1) - if (username.length === 6) return username + if (!username.includes(' ')) return username return username .split(' ')