This commit is contained in:
2026-02-08 18:43:20 +08:00
parent ed95bdddac
commit eff83a9f68
11 changed files with 132 additions and 39 deletions
+2 -2
View File
@@ -35,9 +35,9 @@ namespace IM_API.Hubs
//将用户加入已加入聊天的会话组
string userIdStr = Context.User.FindFirstValue(ClaimTypes.NameIdentifier);
var keys = await _conversationService.GetUserAllStreamKeyAsync(int.Parse(userIdStr));
foreach(var key in keys)
foreach (var key in keys)
{
await Groups.AddToGroupAsync(Context.ConnectionId,key);
await Groups.AddToGroupAsync(Context.ConnectionId, key);
}
await base.OnConnectedAsync();
}