mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-22 20:24:55 +00:00
technical edits
This commit is contained in:
@@ -19,7 +19,11 @@ public class ChatsHub : Hub
|
||||
private readonly IUserGroupsService _userService;
|
||||
private readonly IHubUserAccessor _userAccessor;
|
||||
|
||||
public ChatsHub(ILogger<ChatsHub> logger, IMessageCommandService messageCommandService, IUserGroupsService userService, IHubUserAccessor userAccessor)
|
||||
public ChatsHub(
|
||||
ILogger<ChatsHub> logger,
|
||||
IMessageCommandService messageCommandService,
|
||||
IUserGroupsService userService,
|
||||
IHubUserAccessor userAccessor)
|
||||
{
|
||||
_logger = logger;
|
||||
_messageCommandService = messageCommandService;
|
||||
@@ -60,10 +64,8 @@ public class ChatsHub : Hub
|
||||
_logger.LogInformation("User {UserId} disconnected with ConnectionId {ConnectionId} and removed from their group",
|
||||
userId, Context.ConnectionId);
|
||||
|
||||
var userGroups =
|
||||
await _userService
|
||||
.GetUserGroupsAsync(
|
||||
userId);
|
||||
var userGroups = await _userService.GetUserGroupsAsync(userId);
|
||||
|
||||
foreach (var group in userGroups)
|
||||
{
|
||||
await Groups.RemoveFromGroupAsync(Context.ConnectionId, $"group_{group.Id}");
|
||||
@@ -236,6 +238,7 @@ public class ChatsHub : Hub
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region common
|
||||
private UserMessageResponse BuildUserMessageResponse(Message message, Guid? replyToId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user