From 5055135eb7f189a98bb36bd9ecd2a01dbb06a916 Mon Sep 17 00:00:00 2001 From: you Date: Wed, 18 Mar 2026 23:19:37 +0000 Subject: [PATCH] Add 'View packet' link in channel chat messages Include packetId in channel message API response, render as link in message metadata row that navigates to #/packets/id/. --- public/channels.js | 2 +- server.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/channels.js b/public/channels.js index 1a06674d..0027a5ed 100644 --- a/public/channels.js +++ b/public/channels.js @@ -398,7 +398,7 @@
${displayText}
-
${meta.join(' · ')}
+
${meta.join(' · ')}${msg.packetId ? ` · View packet →` : ''}
`; }).join(''); diff --git a/server.js b/server.js index c8310a6c..e16493a3 100644 --- a/server.js +++ b/server.js @@ -994,6 +994,7 @@ app.get('/api/channels/:hash/messages', (req, res) => { encrypted: !decoded.text && !decoded.sender, timestamp: pkt.timestamp, sender_timestamp: decoded.sender_timestamp || null, + packetId: pkt.id, repeats: 1, observers: [pkt.observer_name || pkt.observer_id].filter(Boolean), hops: decoded.path_len || (pkt.path_json ? JSON.parse(pkt.path_json).length : 0),