add(conversation):完善私聊好友会话服务

This commit is contained in:
2026-01-03 22:13:28 +08:00
35 changed files with 456 additions and 54 deletions
@@ -1,4 +1,8 @@
using IM_API.Dtos;
using IM_API.Application.EventHandlers;
using IM_API.Application.Interfaces;
using IM_API.Domain.Events;
using IM_API.Dtos;
using IM_API.Infrastructure.EventBus;
using IM_API.Interface.Services;
using IM_API.Services;
using IM_API.Tools;
@@ -18,6 +22,9 @@ namespace IM_API.Configs
services.AddTransient<IFriendSerivce, FriendService>();
services.AddTransient<IMessageSevice, MessageService>();
services.AddTransient<IConversationService, ConversationService>();
services.AddScoped<IEventBus, InMemoryEventBus>();
services.AddScoped<IEventHandler<MessageCreatedEvent>, SignalREventHandler>();
services.AddScoped<IEventHandler<MessageCreatedEvent>, ConversationEventHandler>();
services.AddSingleton<IJWTService, JWTService>();
services.AddSingleton<IRefreshTokenService, RedisRefreshTokenService>();
return services;