From b433ef68ec47b3e411488f84bc12a43831a64936 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Sun, 2 Apr 2023 20:39:01 +0530 Subject: [PATCH] Fix broken SES bounce type check. --- internal/bounce/webhooks/ses.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/bounce/webhooks/ses.go b/internal/bounce/webhooks/ses.go index 02b423c..a7e8d6d 100644 --- a/internal/bounce/webhooks/ses.go +++ b/internal/bounce/webhooks/ses.go @@ -119,7 +119,7 @@ func (s *SES) ProcessBounce(b []byte) (models.Bounce, error) { return bounce, fmt.Errorf("error unmarshalling SES notification: %v", err) } - if !(m.EventType == "Bounce" || m.NotifType == "Bounce") { + if (m.EventType != "" && m.EventType != "Bounce") || (m.NotifType != "" && m.NotifType != "Bounce") { return bounce, errors.New("notification type is not bounce") }