From 0701a413faa25ce0896cd6c2eccbfaef3a076262 Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Tue, 8 Jul 2025 09:52:02 +0200 Subject: [PATCH] no message --- .../SendNewSubTaskEmailNotification.php | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/be/app/Listeners/SendNewSubTaskEmailNotification.php b/be/app/Listeners/SendNewSubTaskEmailNotification.php index b2c2706..5de7549 100644 --- a/be/app/Listeners/SendNewSubTaskEmailNotification.php +++ b/be/app/Listeners/SendNewSubTaskEmailNotification.php @@ -32,16 +32,17 @@ class SendNewSubTaskEmailNotification implements ShouldQueue public function handle(SubTaskCreated $event) { // ked je v subtasku viacej userov, tak poslem 1 email notifikaciu so vsetkymi usermi, ktori su v master tasku - if (count($event->subtask->mastertask->subtasks) > 1) { - $emails = $event->subtask->mastertask->all_users_in_master_task->pluck('email')->unique()->toArray(); - - if (empty($emails)) { - return; - } - - Mail::to($emails)->send(new NewTask($event->subtask)); - } else { - Mail::to($event->subtask->user->email)->send(new NewTask($event->subtask)); - } +// if (count($event->subtask->mastertask->subtasks) > 1) { +// $emails = $event->subtask->mastertask->all_users_in_master_task->pluck('email')->unique()->toArray(); +// +// if (empty($emails)) { +// return; +// } +// +// Mail::to($emails)->send(new NewTask($event->subtask)); +// } else { +// Mail::to($event->subtask->user->email)->send(new NewTask($event->subtask)); +// } + Mail::to($event->subtask->user->email)->send(new NewTask($event->subtask)); } }