From f09e338dfa489f86f2dfcd6ff8a03a558ce70b82 Mon Sep 17 00:00:00 2001 From: you Date: Sun, 22 Mar 2026 04:38:07 +0000 Subject: [PATCH] fix: WS broadcast had null packet when observation was deduped getById() returns null for deduped observations (not stored in byId). Client filters on m.data.packet being truthy, so all deduped packets were silently dropped from WS. Fallback to transmission or raw pktData. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 642c439..ae8e1b9 100644 --- a/server.js +++ b/server.js @@ -730,7 +730,7 @@ for (const source of mqttSources) { // Invalidate caches on new data cache.debouncedInvalidateAll(); - const fullPacket = pktStore.getById(packetId); + const fullPacket = pktStore.getById(packetId) || pktStore.byHash.get(pktData.hash) || pktData; const tx = pktStore.byHash.get(pktData.hash); const observation_count = tx ? tx.observation_count : 1; const broadcastData = { id: packetId, raw: msg.raw, decoded, snr: msg.SNR, rssi: msg.RSSI, hash: pktData.hash, observer: observerId, packet: fullPacket, observation_count };