Skip to content

Commit

Permalink
Fix broken SES bounce type check.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Apr 2, 2023
1 parent a955102 commit b433ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/bounce/webhooks/ses.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit b433ef6

Please sign in to comment.