You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I need to send a message to all sockets except a certain user. In my application I let my sockets join a room equal to their user id, which looks like this:
which works nicely. (Note that I have implemented some custom logic that allows me to use io.except('user').emit() by calling the namespace's adapter directly.
However, I'm in a position now where I need this functionality to work with socket.io-redis as well. This is a problem because I can't have socket.io-redis extend from my custom adapter. I filed a PR for this but it looks like this is not possible due to TypeScript limitations. Hence I thought it would be a nice functionality to have in the adapter itself. I will file a PR for this.
The text was updated successfully, but these errors were encountered:
sebamarynissen
added a commit
to sebamarynissen/socket.io-adapter
that referenced
this issue
Jan 28, 2021
I have a use case where I need to send a message to all sockets except a certain user. In my application I let my sockets join a room equal to their user id, which looks like this:
I noticed that it was possible to implement this behavior by extending the socket.io adapter as:
which works nicely. (Note that I have implemented some custom logic that allows me to use
io.except('user').emit()
by calling the namespace's adapter directly.However, I'm in a position now where I need this functionality to work with
socket.io-redis
as well. This is a problem because I can't havesocket.io-redis
extend from my custom adapter. I filed a PR for this but it looks like this is not possible due to TypeScript limitations. Hence I thought it would be a nice functionality to have in the adapter itself. I will file a PR for this.The text was updated successfully, but these errors were encountered: