Closed
Description
Note: for support questions, please use one of these channels: stackoverflow or slack
For bug reports and feature requests for the Swift client, please open an issue there.
For bug reports and feature requests for the Java client, please open an issue there.
You want to:
- request a feature
Current behaviour
Thanks to #2879 it is possible to join several rooms at once.
It would be nice to have the same for sending a message to multiple rooms.
Currently, we can achieve it with following code snippet:
['room1', 'room2', 'room3'].forEach(room => {
// send message to all clients in the room, but the sender
socket.broadcast.to(room).emit('message', 'nice game');
});
It would be much better if we can have it like that:
io.in(['room1', 'room2', 'room3']).emit('message', 'cool game');
socket.broadcast.to(['room1', 'room2', 'room3']).emit('message', 'nice game');
Metadata
Metadata
Assignees
Labels
No labels