diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index 366e87c3..f872f3a2 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -110,17 +110,19 @@ const createLoginResponse = (myAddress: string, account: IDatabaseAccountJson, b Groups: [], IRC: config.myIrcAddresses ?? [myAddress], NRS: config.NRS, - DTLS: 99, BuildLabel: buildLabel }; - 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}/`]; + } } } } diff --git a/src/types/loginTypes.ts b/src/types/loginTypes.ts index dfdebe0e..3f412d1e 100644 --- a/src/types/loginTypes.ts +++ b/src/types/loginTypes.ts @@ -50,7 +50,7 @@ export interface ILoginResponse extends IAccountAndLoginResponseCommons { MatchmakingBuildId?: string; platformCDNs?: string[]; NRS?: string[]; - DTLS: number; + DTLS?: number; IRC: string[]; HUB?: string; }