I'm currently trying to build a web chat app, kind of like omegle but with no video or voice. I'm trying to get all the rooms, but once I try console logging the rooms all I get is either
Map(2) {
'7zqY9KBN2F9u8QKOAAAB' => Set(1) { '7zqY9KBN2F9u8QKOAAAB' },
'test' => Set(1) { '7zqY9KBN2F9u8QKOAAAB' }
}
this is my code for trying to log the users
//
socket.on("chatroom with stranger", async msg => {
console.log(msg)
await socket.join("test")
socket.emit("test", "Message to everyone")
console.log(Object.keys(io.sockets.adapter.sids))
})