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 2a2fbed732 - Show all commits

4
app.js
View File

@ -279,6 +279,10 @@ function leaveRoom() {
roomItem.remove();
}
console.log(config.rooms);
console.log(config.rooms.filter(e => e !== currentRoom.topic.toString()));
console.log(currentRoom.topic);
console.log(currentRoom.topic.toString());
config.rooms = config.rooms.filter(e => e !== currentRoom.topic.toString());
writeConfigToFile("./config.json");