From dcae15e8d86d9e45f8e33d4ad1c3398fe7ce4b75 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 24 Aug 2023 15:14:47 +0200 Subject: [PATCH] Fixed: [notificationMailer] invert 'if continue' condition inside foreach loop --- .changes/unreleased/Fixed-20230824-152038.yaml | 6 ++++++ .../Notification/Email/NotificationMailer.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixed-20230824-152038.yaml diff --git a/.changes/unreleased/Fixed-20230824-152038.yaml b/.changes/unreleased/Fixed-20230824-152038.yaml new file mode 100644 index 000000000..656bd4752 --- /dev/null +++ b/.changes/unreleased/Fixed-20230824-152038.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix who receive reply notification when adding comment (recipees must receive + it, and sender not). +time: 2023-08-24T15:20:38.472382872+02:00 +custom: + Issue: "137" diff --git a/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php b/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php index 5290492b1..a652231ac 100644 --- a/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php +++ b/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php @@ -46,7 +46,7 @@ class NotificationMailer [$comment->getNotification()->getSender()] ) as $dest ) { - if (null === $dest->getEmail() || $comment->getCreatedBy() !== $dest) { + if (null !== $dest->getEmail() && $comment->getCreatedBy() === $dest) { continue; } $email = new TemplatedEmail();