Skip to content emitting to all clients works, but emitting to room doesn’t work

When I try io.emit(), the message gets emitted to everyone but when I try, the message doesn’t get emitted (In the 3rd last line of the code).

I manually checked the sockets in the room, and all are present in the room correctly. But the message never gets transmitted.

io.on('connection', (socket) => {
    socket.on("create game", async ( gameID, host ) => {
        // some logic
    socket.on("join game", async ( gameID, user ) => {
        // some logic"new user", user);


I was able to fix it using"new user", user); instead