前端:
1、完善创建群聊逻辑 后端: 1、完善群聊相关接口
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
using IM_API.Domain.Events;
|
||||
using IM_API.Interface.Services;
|
||||
using MassTransit;
|
||||
|
||||
namespace IM_API.Application.EventHandlers.GroupInviteActionUpdateHandler
|
||||
{
|
||||
public class RequestDbHandler : IConsumer<GroupInviteActionUpdateEvent>
|
||||
{
|
||||
private readonly IGroupService _groupService;
|
||||
public RequestDbHandler(IGroupService groupService)
|
||||
{
|
||||
_groupService = groupService;
|
||||
}
|
||||
|
||||
public async Task Consume(ConsumeContext<GroupInviteActionUpdateEvent> context)
|
||||
{
|
||||
var @event = context.Message;
|
||||
if(@event.Action == Models.GroupInviteState.Passed)
|
||||
{
|
||||
await _groupService.MakeGroupRequestAsync(@event.UserId, @event.InviteUserId,@event.GroupId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user