Skip to content

[fix] Add check for eventType or notificationType in AWS SES handler #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2021

Conversation

emchooo
Copy link
Contributor

@emchooo emchooo commented Oct 12, 2021

Hi,

I tried to use this package and during testing I saw that AWS sends notifications but I had problems with registering response in application. I was testing with AWS [email protected] and [email protected] addresses.

After some debugging I figured out that problem is in response. This package check for $decodedMessage['eventType'] but in my response from AWS there is no eventType key, but instead I had notificationType.

Response is basically same only difference is in object key name ( eventType -> notificationType ).

I fixed this in my project by overriding onNotification method and adding check for type and everything else works as expected.

Here you can read more about this issue - mautic/mautic#8903 (comment)

@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #21 (64cea92) into master (8ef0830) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##              master       #21   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity         8         9    +1     
===========================================
  Files              4         4           
  Lines             28        29    +1     
===========================================
+ Hits              28        29    +1     
Impacted Files Coverage Δ
src/Http/Controllers/SesWebhook.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ef0830...64cea92. Read the comment docs.

@rennokki rennokki changed the title add check for eventType [fix] Add check for eventType or notificationType in AWS SES handler Oct 13, 2021
@rennokki rennokki merged commit 2c3979e into renoki-co:master Oct 13, 2021
@rennokki
Copy link
Member

Thanks. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants