Files
hrynco-notification-service/HrynCo.NotificationService.Worker/SendPushDeliveryValidator.cs
agrynco 1631786ce2 feat(push): add service-owned firebase channels and delivery
Add push contracts, provider delivery and channel diagnostics. Link email channels to services and document migration and validation.

Ref: IT-1074
2026-10-24 12:31:35 +03:00

14 lines
585 B
C#

namespace HrynCo.NotificationService.Worker;
using HrynCo.NotificationService.Contracts.Messages;
using HrynCo.NotificationService.Worker.Services.Push;
using Hrynco.RabbitMq;
internal static class SendPushDeliveryValidator
{
public static bool IsValid(SendPushMessage message, RabbitMqMessageContext context) =>
SupportedMessageTypeParser.Parse(context.MessageType) == SupportedMessageType.SendPushV1 &&
Guid.TryParse(context.MessageId, out _) && context.MessageId == message.CorrelationContext?.CorrelationId &&
PushMessageValidator.IsValid(message);
}