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,
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}/`];
}
}
}
}
}
return resp;
};

View File

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