adonis-websocket
adonis-websocket copied to clipboard
broadcast
Coverage remained the same at 93.703% when pulling 5029c1d93e4c491d17298fb905c6ffab59ba6282 on vityukBogdan:broadcast into 1d99b9ad81322a4197dcf2ed638f5bd071cf3842 on adonisjs:develop.
Coverage remained the same at 93.703% when pulling 5029c1d93e4c491d17298fb905c6ffab59ba6282 on vityukBogdan:broadcast into 1d99b9ad81322a4197dcf2ed638f5bd071cf3842 on adonisjs:develop.
It seems that this change could break some code. Therefore, it will not be merge right now
Infact, the current behavior is correct. Here's why
const topic = Ws.getChannel('chat').topic('watercooler')
Now you have access to all the sockets subscribed to watercooler topic. When you say topic.broadcast()
, you don't know which socket to ignore. So the message must go to all the sockets
I have a http
controller that is using topic.broadcast()
. I'm very surprised to see that it's broadcasting the event also to the client that sent the HTTP request. Why is that the case and how could I exclude the client that's connected to the topic who sent the HTTP request?