This commit is contained in:
Халимов Рустам
2026-03-29 14:26:14 +03:00
parent 9bae9752cc
commit 22bc964f27
29 changed files with 405 additions and 130 deletions

View File

@@ -0,0 +1,8 @@
using System;
namespace Knot.Modules.Conversations.Application.Abstractions;
public interface IUserStatusService
{
bool IsUserOnline(string userId);
}

View File

@@ -48,6 +48,7 @@ public static class DependencyInjection
services.AddScoped<Knot.Modules.Messaging.Application.Abstractions.IChatAccessProvider, Knot.Modules.Conversations.Infrastructure.Services.ChatAccessProvider>();
services.AddScoped<Knot.Modules.Messaging.Application.Abstractions.IMessageNotifier, Knot.Modules.Conversations.Infrastructure.SignalR.MessageNotifier>();
services.AddScoped<IUserStatusService, Knot.Modules.Conversations.Infrastructure.Services.UserStatusService>();
return services;
}
}

View File

@@ -0,0 +1,12 @@
using Knot.Modules.Conversations.Application.Abstractions;
using Knot.Modules.Conversations.Infrastructure.SignalR;
namespace Knot.Modules.Conversations.Infrastructure.Services;
public sealed class UserStatusService : IUserStatusService
{
public bool IsUserOnline(string userId)
{
return ChatHub.IsUserOnline(userId);
}
}