Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignalR Groups: Do not send message back to sender

Tags:

signalr

When I send a message to a signalR group that I am subscribed to, I get the message back!

I do not want this, I want it to send the message to everyone else in the group.

Is this possible? How?

like image 613
John H Avatar asked Dec 26 '22 16:12

John H


1 Answers

Now with SignalR you are able to use

Clients.OthersInGroup("foo").send(message);

which does exactly what you're after. It will send a SignalR client message to everyone in a group except the caller.

You can read more here: SignalR wiki Hubs

like image 181
Ben Clark-Robinson Avatar answered Feb 19 '23 18:02

Ben Clark-Robinson