Fix broken SES bounce type check.

This commit is contained in:
Kailash Nadh 2023-04-02 20:39:01 +05:30
parent a95510260d
commit b433ef68ec

View file

@ -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")
}