-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
You want to:
- report a bug
- request a feature
Current behaviour
When I store a io.to object to a variable, and call the object, the message was sent to all the clients, not only the clients in the room.
Steps to reproduce (if the current behaviour is a bug)
I store io.to to a variable:
this.broadcaster=io.to(this.internalRoomName);
Then I call the variable again somewhere else:
this.broadcaster.emit("someevent","something")
the server broadcast the event to all the client, not only the clients in the room
Expected behaviour
What I expected:
io.to(this.internalRoomName).emit("someevent","something")
Setup
- OS: Win10
- browser: Chrome and Edge
- socket.io version: v2.1.1
Other information (e.g. stacktraces, related issues, suggestions how to fix)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request