Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [Validator] Missing translations for Estonian (et)
  [HttpFoundation] Prevent duplicated headers when using Early Hints
  [VarDumper] Fix configuring CliDumper with SYMFONY_IDE env var
  [Cache] improve BC with 5.4 pools
  [PhpUnitBridge][VarDumper] fix color detection
  [CI] Make sure we preserve file->header when we run sync-translations.php
  [Cache] Fix BC layer with pre-6.1 cache items
  Review validators.sl.xlf
  [Mailer][Postmark][Webhook] Don't require tag and metadata
  [Scheduler] Fix messenger receiver with no alias
  • Loading branch information
xabbuh committed Feb 8, 2024
2 parents 214e21c + f16d978 commit 2f7e69a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 7 additions & 2 deletions RemoteEvent/PostmarkPayloadConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ public function convert(array $payload): AbstractMailerEvent
}
$event->setDate($date);
$event->setRecipientEmail($payload['Recipient'] ?? $payload['Email']);
$event->setMetadata($payload['Metadata']);
$event->setTags([$payload['Tag']]);

if (isset($payload['Metadata'])) {
$event->setMetadata($payload['Metadata']);
}
if (isset($payload['Tag'])) {
$event->setTags([$payload['Tag']]);
}

return $event;
}
Expand Down
2 changes: 0 additions & 2 deletions Webhook/PostmarkRequestParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ protected function doParse(Request $request, #[\SensitiveParameter] string $secr
!isset($payload['RecordType'])
|| !isset($payload['MessageID'])
|| !(isset($payload['Recipient']) || isset($payload['Email']))
|| !isset($payload['Metadata'])
|| !isset($payload['Tag'])
) {
throw new RejectWebhookException(406, 'Payload is malformed.');
}
Expand Down

0 comments on commit 2f7e69a

Please sign in to comment.