This commit is contained in:
2026-02-08 15:13:55 +08:00
parent ed95bdddac
commit 46472f03e6
10 changed files with 124 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();
}