This commit is contained in:
MrMasrozYTLIVE 2024-06-09 11:10:02 +03:00
commit 33e0a13f93

2
app.js
View File

@ -302,7 +302,9 @@ function sendMessage(e) {
message, message,
avatar: config.userAvatar, avatar: config.userAvatar,
topic: b4a.toString(currentRoom.topic, 'hex'), topic: b4a.toString(currentRoom.topic, '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];