Fix for pre-25.7
All checks were successful
Build / build (push) Successful in 1m6s
Build / build (pull_request) Successful in 1m45s

This commit is contained in:
Sainan 2025-05-03 06:59:16 +02:00
parent eea9dc0b09
commit 034be6558f
2 changed files with 19 additions and 16 deletions

View File

@ -101,7 +101,6 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b
id: account.id, id: account.id,
DisplayName: account.DisplayName, DisplayName: account.DisplayName,
CountryCode: account.CountryCode, CountryCode: account.CountryCode,
ForceLogoutVersion: account.ForceLogoutVersion,
AmazonAuthToken: account.AmazonAuthToken, AmazonAuthToken: account.AmazonAuthToken,
AmazonRefreshToken: account.AmazonRefreshToken, AmazonRefreshToken: account.AmazonRefreshToken,
ConsentNeeded: account.ConsentNeeded, ConsentNeeded: account.ConsentNeeded,
@ -111,23 +110,27 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b
NRS: config.NRS, NRS: config.NRS,
BuildLabel: buildLabel 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) { if (version_compare(buildLabel, "2019.10.31.22.42") >= 0) {
// U26 and up // U26 and up
resp.Groups = []; resp.Groups = [];
}
if (version_compare(buildLabel, "2021.04.13.19.58") >= 0) { if (version_compare(buildLabel, "2021.04.13.19.58") >= 0) {
resp.DTLS = 99; resp.DTLS = 99;
}
if (version_compare(buildLabel, "2022.04.29.12.53") >= 0) { if (version_compare(buildLabel, "2022.04.29.12.53") >= 0) {
resp.ClientType = account.ClientType; resp.ClientType = account.ClientType;
}
if (version_compare(buildLabel, "2022.09.06.19.24") >= 0) { if (version_compare(buildLabel, "2022.09.06.19.24") >= 0) {
resp.CrossPlatformAllowed = account.CrossPlatformAllowed; resp.CrossPlatformAllowed = account.CrossPlatformAllowed;
resp.HUB = `https://${myAddress}/api/`; resp.HUB = `https://${myAddress}/api/`;
resp.MatchmakingBuildId = buildConfig.matchmakingBuildId; resp.MatchmakingBuildId = buildConfig.matchmakingBuildId;
}
if (version_compare(buildLabel, "2023.04.25.23.40") >= 0) { if (version_compare(buildLabel, "2023.04.25.23.40") >= 0) {
resp.platformCDNs = [`https://${myAddress}/`]; resp.platformCDNs = [`https://${myAddress}/`];
} }
}
}
}
}
return resp; return resp;
}; };

View File

@ -5,7 +5,7 @@ export interface IAccountAndLoginResponseCommons {
CountryCode: string; CountryCode: string;
ClientType?: string; ClientType?: string;
CrossPlatformAllowed?: boolean; CrossPlatformAllowed?: boolean;
ForceLogoutVersion: number; ForceLogoutVersion?: number;
AmazonAuthToken?: string; AmazonAuthToken?: string;
AmazonRefreshToken?: string; AmazonRefreshToken?: string;
ConsentNeeded: boolean; ConsentNeeded: boolean;