Enforce chat contact preferences

Filter video calls and private messages per connection and prepare mode-aware call signaling. Audio-only media remains unimplemented.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-11-16 01:16:08 +00:00
commit 9e4f9d55ea
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
8 changed files with 156 additions and 24 deletions

View file

@ -365,17 +365,11 @@ namespace Yavsc.Server.Hubs
}
_logger.LogInformation("getting cx id´s");
var cxIds = _cxManager.GetConnexionIds(userName);
if (cxIds == null || cxIds.Count() == 0)
var cxIds = _cxManager.GetConnexionIds(userName)?.Distinct().ToArray() ?? [];
if (cxIds.Length == 0)
_logger.LogError($"No such connected user : {userName}");
else foreach (var connectionId in cxIds)
{
_logger.LogInformation($"cx: {connectionId}");
var cli = Clients.Client(connectionId);
_logger.LogInformation($"cli: {cli.ToString()}");
await cli.SendAsync("addPV", identityUserName, message);
_logger.LogInformation($"Sent pv to cx {connectionId}");
}
else
await _calls.SendPrivateMessageAsync(Context.ConnectionId, identityUserName, cxIds, message);
}
public async Task SendStream(string connectionId, long streamId, string message)