From 3581548ce3aa29b6c91b42edc266a0d38dcd0355 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 1 May 2025 08:55:29 +0200 Subject: [PATCH] fix: login failure on U31 the new war & U30.5 sisters of parvos --- src/controllers/api/loginController.ts | 16 +++++++++------- src/types/loginTypes.ts | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index cf5f759f..0d595e95 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -99,7 +99,6 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b id: account.id, DisplayName: account.DisplayName, CountryCode: account.CountryCode, - ClientType: account.ClientType, ForceLogoutVersion: account.ForceLogoutVersion, AmazonAuthToken: account.AmazonAuthToken, AmazonRefreshToken: account.AmazonRefreshToken, @@ -112,12 +111,15 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b DTLS: 99, BuildLabel: buildLabel }; - if (version_compare(buildLabel, "2022.09.06.19.24") >= 0) { - resp.CrossPlatformAllowed = account.CrossPlatformAllowed; - resp.HUB = `https://${myAddress}/api/`; - resp.MatchmakingBuildId = buildConfig.matchmakingBuildId; - if (version_compare(buildLabel, "2023.04.25.23.40") >= 0) { - resp.platformCDNs = [`https://${myAddress}/`]; + if (version_compare(buildLabel, "2022.04.29.12.53") >= 0) { + resp.ClientType = account.ClientType; + if (version_compare(buildLabel, "2022.09.06.19.24") >= 0) { + resp.CrossPlatformAllowed = account.CrossPlatformAllowed; + resp.HUB = `https://${myAddress}/api/`; + resp.MatchmakingBuildId = buildConfig.matchmakingBuildId; + if (version_compare(buildLabel, "2023.04.25.23.40") >= 0) { + resp.platformCDNs = [`https://${myAddress}/`]; + } } } return resp; diff --git a/src/types/loginTypes.ts b/src/types/loginTypes.ts index 654bc4dc..79cf538d 100644 --- a/src/types/loginTypes.ts +++ b/src/types/loginTypes.ts @@ -3,7 +3,7 @@ import { Types } from "mongoose"; export interface IAccountAndLoginResponseCommons { DisplayName: string; CountryCode: string; - ClientType: string; + ClientType?: string; CrossPlatformAllowed?: boolean; ForceLogoutVersion: number; AmazonAuthToken?: string;