From 73a5b9bc75d40a30e7c9674b292957657ac01f63 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 17 Oct 2015 09:51:15 -0400 Subject: Make user notifications pluggable --- app/Model/OverdueNotification.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Model/OverdueNotification.php') diff --git a/app/Model/OverdueNotification.php b/app/Model/OverdueNotification.php index f44c8dd7..d8c2fef4 100644 --- a/app/Model/OverdueNotification.php +++ b/app/Model/OverdueNotification.php @@ -22,7 +22,7 @@ class OverdueNotification extends Base foreach ($this->groupByColumn($tasks, 'project_id') as $project_id => $project_tasks) { // Get the list of users that should receive notifications for each projects - $users = $this->notification->getUsersWithNotificationEnabled($project_id); + $users = $this->userNotification->getUsersWithNotificationEnabled($project_id); foreach ($users as $user) { $this->sendUserOverdueTaskNotifications($user, $project_tasks); @@ -44,13 +44,13 @@ class OverdueNotification extends Base $user_tasks = array(); foreach ($tasks as $task) { - if ($this->notificationFilter->shouldReceiveNotification($user, array('task' => $task))) { + if ($this->userNotificationFilter->shouldReceiveNotification($user, array('task' => $task))) { $user_tasks[] = $task; } } if (! empty($user_tasks)) { - $this->notification->sendUserNotification( + $this->userNotification->sendUserNotification( $user, Task::EVENT_OVERDUE, array('tasks' => $user_tasks, 'project_name' => $tasks[0]['project_name']) -- cgit v1.2.3