2026-07-22 19:54:55 +00:00
|
|
|
using Heimdall.Application.Services;
|
|
|
|
|
using MediatR;
|
|
|
|
|
|
|
|
|
|
namespace Heimdall.Application.Events.Notifications;
|
|
|
|
|
|
|
|
|
|
public class EventCreatedNotificationHandler : INotificationHandler<EventCreatedNotification>
|
|
|
|
|
{
|
|
|
|
|
private readonly IEventBroadcastService _broadcast;
|
|
|
|
|
|
|
|
|
|
public EventCreatedNotificationHandler(IEventBroadcastService broadcast) => _broadcast = broadcast;
|
|
|
|
|
|
|
|
|
|
public async Task Handle(EventCreatedNotification notification, CancellationToken ct)
|
|
|
|
|
{
|
2026-07-27 18:59:12 +00:00
|
|
|
await _broadcast.NotifyEventCreated(notification.Event, ct).ConfigureAwait(false);
|
2026-07-22 19:54:55 +00:00
|
|
|
}
|
|
|
|
|
}
|