Skip to content

Commit

Permalink
Handle notificationType field instead of eventType.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDoctor0 authored Sep 26, 2023
1 parent c198f4a commit fc8f470
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/App/Http/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public function handleRequest(ServerRequestInterface $request, string $type): mi
// At this point we have a valid SNS notification message.
$message = json_decode($body->Message);

if (!isset($message->eventType)) {
$message->eventType = $message->notificationType;
}

// The SES event notification has a Message property that should be a object when decoded.
if (!is_object($message)) {
Log::error('Result message failed to decode: '.json_last_error_msg());
Expand Down

0 comments on commit fc8f470

Please sign in to comment.