adding readableTimestamp to messages

This commit is contained in:
Raven Scott 2024-06-09 04:09:07 -04:00
parent 8458430989
commit babde932e7

1
app.js
View File

@ -303,6 +303,7 @@ function sendMessage(e) {
topic: b4a.toString(currentRoom.topic, 'hex'), topic: b4a.toString(currentRoom.topic, 'hex'),
peers: [...swarm.connections].map(peer => peer.remotePublicKey.toString('hex')), peers: [...swarm.connections].map(peer => peer.remotePublicKey.toString('hex')),
timestamp: Date.now(), timestamp: Date.now(),
readableTimestamp: new Date().toLocaleString(), // Added human-readable timestamp
}); });
const peers = [...swarm.connections]; const peers = [...swarm.connections];