mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-30 17:05:58 +00:00
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.
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user