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();