Fixed rooms not being deleted from the json file #4

Merged
snxraven merged 10 commits from MiTask/LinkUp-P2P-Chat:main into main 2024-06-09 04:20:00 -04:00
Showing only changes of commit 33e0a13f93 - Show all commits

2
app.js
View File

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