using Cleanuparr.Infrastructure.Features.Messaging; using Cleanuparr.Infrastructure.Features.Notifications.Models; namespace Cleanuparr.Infrastructure.Features.Notifications.Consumers; /// /// Sends one queued notification to its configured providers. /// public sealed class NotificationConsumer : IMessageHandler { private readonly NotificationService _notificationService; public NotificationConsumer(NotificationService notificationService) { _notificationService = notificationService; } /// public Task HandleAsync(NotificationMessage message) => _notificationService.SendNotificationAsync(message.EventType, message.Context); }