Revert "提交"

This reverts commit b96d895809.
This commit is contained in:
2026-02-12 21:59:08 +08:00
parent b96d895809
commit d429560511
339 changed files with 46657 additions and 46655 deletions
@@ -1,26 +1,26 @@
using IM_API.Domain.Events;
using IM_API.Dtos;
using IM_API.Hubs;
using IM_API.VOs.Group;
using MassTransit;
using Microsoft.AspNetCore.SignalR;
namespace IM_API.Application.EventHandlers.GroupInviteHandler
{
public class GroupInviteSignalRHandler : IConsumer<GroupInviteEvent>
{
private readonly IHubContext<ChatHub> _hub;
public GroupInviteSignalRHandler(IHubContext<ChatHub> hub)
{
_hub = hub;
}
public async Task Consume(ConsumeContext<GroupInviteEvent> context)
{
var @event = context.Message;
var list = @event.Ids.Select(id => id.ToString()).ToArray();
var msg = new HubResponse<GroupInviteVo>("Event", new GroupInviteVo { GroupId = @event.GroupId, UserId = @event.UserId });
await _hub.Clients.Users(list).SendAsync("ReceiveMessage", msg);
}
}
}
using IM_API.Domain.Events;
using IM_API.Dtos;
using IM_API.Hubs;
using IM_API.VOs.Group;
using MassTransit;
using Microsoft.AspNetCore.SignalR;
namespace IM_API.Application.EventHandlers.GroupInviteHandler
{
public class GroupInviteSignalRHandler : IConsumer<GroupInviteEvent>
{
private readonly IHubContext<ChatHub> _hub;
public GroupInviteSignalRHandler(IHubContext<ChatHub> hub)
{
_hub = hub;
}
public async Task Consume(ConsumeContext<GroupInviteEvent> context)
{
var @event = context.Message;
var list = @event.Ids.Select(id => id.ToString()).ToArray();
var msg = new HubResponse<GroupInviteVo>("Event", new GroupInviteVo { GroupId = @event.GroupId, UserId = @event.UserId });
await _hub.Clients.Users(list).SendAsync("ReceiveMessage", msg);
}
}
}