ASP.NET Core SignalR
I know we can send messages to a group. I know we can send messages to a user. Is there a way to send messages to a user in a group, i.e. the intersection of the previous audiences.
From what I understand: A group is a collection of connections with group name in metadata, and a user is a collection connections with user name in auth claims. A user in a group would be the collection of connections which belong to the specific user and are part of specific group.
Afaik from how SignalR works internally, this should be possible, but it's likely that no such method has been exposed.
The use-case: Say you have chat groups with a bunch of people, and you want to send a specific system message to one of the users in the group. For example, let's say the server needs to randomly select one of the users in the group and send them a secret code for a game, which the others should not know (assume that the server already has a list of all users in a group and that is unchanging, only connections may change). The message should go to the specific user, but not to all of his connections. He may have some other connections which are active for a different chat group, and so we don't want to notify those connections. We only want to target the connections belonging to that user which are currently part of the specific chat group.
I'm using Azure SignalR Service in Serverless Mode with NodeJS Azure Function Apps. Answers for Default server mode in C# would help as well.