After the client emits a message to the server, I'm trying to emit that message to every other client in the room, however the original client who sent the message also receives the emit... This seems to go completely against all documentation I've read. My code is as follows:
socket.on('slots', (slots) => {
console.log(socket.id);
const [thisRoom] = socket.rooms;
console.log(thisRoom);
socket.to(thisRoom).emit('slots', slots);
});
I'm using socket.io 4.5.3.
Many thanks.