From b19b57cce8f59b3da65a44d663d97d5da2a2ff24 Mon Sep 17 00:00:00 2001 From: you Date: Sat, 21 Mar 2026 22:12:56 +0000 Subject: [PATCH] fix: use current time for channel lastActivity on WS updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit packet.timestamp is first_seen — when the transmission was originally observed. When multiple observers re-see the same old packet, the broadcast carries the original (stale) first_seen. For channel list display, what matters is 'activity happened now', not 'packet was first seen 10h ago'. --- public/channels.js | 3 +-- public/index.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/public/channels.js b/public/channels.js index f405856..11d58c0 100644 --- a/public/channels.js +++ b/public/channels.js @@ -407,8 +407,7 @@ } if (!sender) sender = 'Unknown'; - var ts = m.data?.packet?.timestamp || m.data?.timestamp || new Date().toISOString(); - console.log('[ch-ws] channelName:', channelName, 'ts:', ts, 'packet.ts:', m.data?.packet?.timestamp, 'data.ts:', m.data?.timestamp); + var ts = new Date().toISOString(); var pktHash = m.data?.hash || m.data?.packet?.hash || null; var pktId = m.data?.id || null; var snr = m.data?.snr ?? m.data?.packet?.snr ?? payload.SNR ?? null; diff --git a/public/index.html b/public/index.html index d764b5c..3118838 100644 --- a/public/index.html +++ b/public/index.html @@ -86,7 +86,7 @@ - +