前端:
1、完善创建群聊逻辑 后端: 1、完善群聊相关接口
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
using IM_API.Domain.Events;
|
||||
using IM_API.Interface.Services;
|
||||
using MassTransit;
|
||||
|
||||
namespace IM_API.Application.EventHandlers.GroupJoinHandler
|
||||
{
|
||||
public class GroupJoinConversationHandler : IConsumer<GroupJoinEvent>
|
||||
{
|
||||
private IConversationService _conversationService;
|
||||
public GroupJoinConversationHandler(IConversationService conversationService)
|
||||
{
|
||||
_conversationService = conversationService;
|
||||
}
|
||||
|
||||
public async Task Consume(ConsumeContext<GroupJoinEvent> context)
|
||||
{
|
||||
var @event = context.Message;
|
||||
await _conversationService.MakeConversationAsync(@event.UserId, @event.GroupId, Models.ChatType.GROUP);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user