Профили, группы, групповые звонки

This commit is contained in:
Халимов Рустам
2026-03-15 00:19:36 +03:00
parent 3b990f8619
commit 924bf87cf4
9 changed files with 268 additions and 200 deletions
@@ -382,6 +382,13 @@ public sealed class ChatHub : Hub
participants = others
});
// Broadcast active call participants to everyone in the chat
await Clients.Group(chatId).SendAsync("group_call_active", new
{
chatId = chatId,
participants = participants.Keys.ToList()
});
if (isFirst)
{
await Clients.Group(chatId).SendAsync("group_call_incoming", new
@@ -402,6 +409,14 @@ public sealed class ChatHub : Hub
if (_groupCallParticipants.TryGetValue(chatId, out var participants))
{
participants.TryRemove(userId, out _);
// Broadcast updated participants list
await Clients.Group(chatId).SendAsync("group_call_active", new
{
chatId = chatId,
participants = participants.Keys.ToList()
});
if (participants.IsEmpty)
{
_groupCallParticipants.TryRemove(chatId, out _);