fix: use current time for channel lastActivity on WS updates

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'.
This commit is contained in:
you
2026-03-21 22:12:56 +00:00
parent cb8e20ae7e
commit b19b57cce8
2 changed files with 2 additions and 3 deletions

View File

@@ -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;

View File

@@ -86,7 +86,7 @@
<script src="home.js?v=1774042199"></script>
<script src="packets.js?v=1774127844"></script>
<script src="map.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="channels.js?v=1774130752" onerror="console.error('Failed to load:', this.src)"></script>
<script src="channels.js?v=1774131176" onerror="console.error('Failed to load:', this.src)"></script>
<script src="nodes.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="traces.js?v=1774350000" onerror="console.error('Failed to load:', this.src)"></script>
<script src="analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>