diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index 492cd660..013e9067 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -101,7 +101,6 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b id: account.id, DisplayName: account.DisplayName, CountryCode: account.CountryCode, - ForceLogoutVersion: account.ForceLogoutVersion, AmazonAuthToken: account.AmazonAuthToken, AmazonRefreshToken: account.AmazonRefreshToken, ConsentNeeded: account.ConsentNeeded, @@ -111,23 +110,27 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b NRS: config.NRS, BuildLabel: buildLabel }; + if (version_compare(buildLabel, "2019.08.29.20.01") >= 0) { + // U25.7 and up + resp.ForceLogoutVersion = account.ForceLogoutVersion; + } if (version_compare(buildLabel, "2019.10.31.22.42") >= 0) { // U26 and up resp.Groups = []; - if (version_compare(buildLabel, "2021.04.13.19.58") >= 0) { - resp.DTLS = 99; - 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}/`]; - } - } - } - } + } + if (version_compare(buildLabel, "2021.04.13.19.58") >= 0) { + resp.DTLS = 99; + } + 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 1b980cb5..fc4bef6a 100644 --- a/src/types/loginTypes.ts +++ b/src/types/loginTypes.ts @@ -5,7 +5,7 @@ export interface IAccountAndLoginResponseCommons { CountryCode: string; ClientType?: string; CrossPlatformAllowed?: boolean; - ForceLogoutVersion: number; + ForceLogoutVersion?: number; AmazonAuthToken?: string; AmazonRefreshToken?: string; ConsentNeeded: boolean;