diff --git a/backend/src/Modules/Conversations/Application/Chats/LeaveOrDelete/LeaveOrDeleteChat.cs b/backend/src/Modules/Conversations/Application/Chats/LeaveOrDelete/LeaveOrDeleteChat.cs index 53d3acc..59e79a5 100644 --- a/backend/src/Modules/Conversations/Application/Chats/LeaveOrDelete/LeaveOrDeleteChat.cs +++ b/backend/src/Modules/Conversations/Application/Chats/LeaveOrDelete/LeaveOrDeleteChat.cs @@ -1,13 +1,14 @@ using System; +using System.Linq; using System.Threading; using System.Threading.Tasks; -using Knot.Shared.Kernel; -using Knot.Contracts.Conversations.Domain; using Knot.Contracts.Conversations.Application.Abstractions; -using MediatR; -using System.Linq; -using Knot.Contracts.Messaging.Application.Abstractions; +using Knot.Contracts.Conversations.Domain; +using Knot.Modules.Conversations.Infrastructure.SignalR; +using Knot.Shared.Kernel; using Knot.Shared.Kernel.Storage; +using MediatR; +using Microsoft.AspNetCore.SignalR; namespace Knot.Modules.Conversations.Application.Chats.LeaveOrDelete; @@ -19,17 +20,21 @@ internal sealed class LeaveOrDeleteChatCommandHandler : ICommandHandler _hubContext; public LeaveOrDeleteChatCommandHandler( - IChatRepository chatRepository, + IChatRepository chatRepository, + IMessageRepository messageRepository, IFileStorageService fileStorage, - IChatsUnitOfWork uow) + IChatsUnitOfWork uow, + IHubContext hubContext) { _chatRepository = chatRepository; _messageRepository = messageRepository; _fileStorage = fileStorage; _uow = uow; + _hubContext = hubContext; } public async Task> Handle(LeaveOrDeleteChatCommand request, CancellationToken cancellationToken) @@ -58,6 +63,14 @@ internal sealed class LeaveOrDeleteChatCommandHandler : ICommandHandler