From 07158a14bd5d66d35449cd197e9584de2f02c5a5 Mon Sep 17 00:00:00 2001 From: Patrick Winters <61561933+19wintersp@users.noreply.github.com> Date: Thu, 1 Oct 2026 12:43:35 +0100 Subject: [PATCH 1/4] fix: skip ATIS callsigns in parsing slurper response --- src/services/vatsim.ts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/services/vatsim.ts b/src/services/vatsim.ts index 3fb07cb..3285f2c 100644 --- a/src/services/vatsim.ts +++ b/src/services/vatsim.ts @@ -129,22 +129,20 @@ export class VatsimService { try { const text = await this.getUserConnectionsCsv(userId); if (text === null) return null; - const trimmed = text.trim(); - if (!trimmed) { - return null; - } - - const parts = trimmed.split(','); - if (parts.length < 3) { - return null; - } - const [cid, callsign, type] = parts; - if (!cid || !callsign || !type) { - return null; + for (const line of text.split("\n")) { + const parts = line.trim().split(','); + if (parts.length < 3) { + return null; + } + + const [cid, callsign, type] = parts; + if (cid && callsign && type && !callsign.endsWith("_ATIS")) { + return { cid, callsign, type }; + } } - return { cid, callsign, type }; + return null; } catch { return null; } From c99a1a1092fac6bf0169dcdbdc4c883908a1f936 Mon Sep 17 00:00:00 2001 From: Patrick Winters <61561933+19wintersp@users.noreply.github.com> Date: Thu, 1 Oct 2026 13:17:01 +0100 Subject: [PATCH 2/4] fix: ignore towerview too --- src/services/vatsim.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/services/vatsim.ts b/src/services/vatsim.ts index 3285f2c..13b647f 100644 --- a/src/services/vatsim.ts +++ b/src/services/vatsim.ts @@ -125,6 +125,8 @@ export class VatsimService { return user; } + + private readonly IGNORED_CALLSIGN_SUFFIXES = new Set(["_ATIS", "_TV"]); async getUserStatus(userId: string): Promise<{ cid: string; callsign: string; type: string } | null> { try { const text = await this.getUserConnectionsCsv(userId); @@ -137,7 +139,10 @@ export class VatsimService { } const [cid, callsign, type] = parts; - if (cid && callsign && type && !callsign.endsWith("_ATIS")) { + if ( + cid && callsign && type && + !this.IGNORED_CALLSIGN_SUFFIXES.has(getCallsignSuffix(callsign)!) + ) { return { cid, callsign, type }; } } From d5c51b4814164b224237534adeee4aa59d0aa4c0 Mon Sep 17 00:00:00 2001 From: Patrick Winters <61561933+19wintersp@users.noreply.github.com> Date: Thu, 1 Oct 2026 13:18:37 +0100 Subject: [PATCH 3/4] fix: use member method ts pmo --- src/services/vatsim.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/vatsim.ts b/src/services/vatsim.ts index 13b647f..fc0b1c7 100644 --- a/src/services/vatsim.ts +++ b/src/services/vatsim.ts @@ -141,7 +141,7 @@ export class VatsimService { const [cid, callsign, type] = parts; if ( cid && callsign && type && - !this.IGNORED_CALLSIGN_SUFFIXES.has(getCallsignSuffix(callsign)!) + !this.IGNORED_CALLSIGN_SUFFIXES.has(this.getCallsignSuffix(callsign)!) ) { return { cid, callsign, type }; } From 7edbdce948500d09bb5225171ea023ed8aab2308 Mon Sep 17 00:00:00 2001 From: Patrick Winters <61561933+19wintersp@users.noreply.github.com> Date: Sat, 3 Oct 2026 00:52:41 +0100 Subject: [PATCH 4/4] fair enough --- src/services/vatsim.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/vatsim.ts b/src/services/vatsim.ts index fc0b1c7..9735bb9 100644 --- a/src/services/vatsim.ts +++ b/src/services/vatsim.ts @@ -126,7 +126,7 @@ export class VatsimService { return user; } - private readonly IGNORED_CALLSIGN_SUFFIXES = new Set(["_ATIS", "_TV"]); + private readonly IGNORED_CALLSIGN_SUFFIXES = new Set(["ATIS", "TV"]); async getUserStatus(userId: string): Promise<{ cid: string; callsign: string; type: string } | null> { try { const text = await this.getUserConnectionsCsv(userId);