Fixed rooms not being deleted from the json file #4
2
app.js
2
app.js
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user