From 0dd06ce89dbec9e580e4aadbc6c69b35dec45791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B0=D0=BB=D0=B8=D0=BC=D0=BE=D0=B2=20=D0=A0=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BC?= Date: Mon, 20 Apr 2026 22:28:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B2=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=B1=20=D1=83=D0=B4=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=87=D0=B0=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chats/LeaveOrDelete/LeaveOrDeleteChat.cs | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) 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