mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 11:44:56 +00:00
Refactor message service and move tests to Application.Tests
Renamed IMessageService to IMessageCommandService and updated all usages accordingly. Moved and renamed test files from Govor.API.Tests to the new Govor.Application.Tests project, updating namespaces to match. Refactored message-related services and controllers to use the new naming and structure. Added Govor.Application.Tests project to the solution.
This commit is contained in:
@@ -14,13 +14,13 @@ namespace Govor.API.Hubs;
|
||||
public class ChatsHub : Hub
|
||||
{
|
||||
private readonly ILogger<ChatsHub> _logger;
|
||||
private readonly IMessageService _messageService;
|
||||
private readonly IMessageCommandService _messageCommandService;
|
||||
private readonly IUserGroupsService _userService;
|
||||
|
||||
public ChatsHub(ILogger<ChatsHub> logger, IMessageService messageService, IUserGroupsService userService)
|
||||
public ChatsHub(ILogger<ChatsHub> logger, IMessageCommandService messageCommandService, IUserGroupsService userService)
|
||||
{
|
||||
_logger = logger;
|
||||
_messageService = messageService;
|
||||
_messageCommandService = messageCommandService;
|
||||
_userService = userService;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ChatsHub : Hub
|
||||
Media: request.MediaAttachments?.Select(f => new SendMedia(f.MediaId, f.EncryptedKey)) ??
|
||||
Array.Empty<SendMedia>());
|
||||
|
||||
var result = await _messageService.SendMessageAsync(sendMessageParams);
|
||||
var result = await _messageCommandService.SendMessageAsync(sendMessageParams);
|
||||
|
||||
if (!result.IsSuccess || result.Message.Id == Guid.Empty)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user