From 8d2fea5624db906521f0ab3526f503979772e4a6 Mon Sep 17 00:00:00 2001 From: voltan Date: Sat, 12 Aug 2017 12:17:25 +0430 Subject: [PATCH] Add notification system --- src/Api/Notification.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Notification.php b/src/Api/Notification.php index 8a2f8c5..d7b20c7 100644 --- a/src/Api/Notification.php +++ b/src/Api/Notification.php @@ -47,7 +47,7 @@ public function askQuestion($question, $project) ); // Send notification to project manager - if (!empty($project)) { + if (!empty($project) && $project['manager'] > 0) { Pi::service('notification')->send( array( $project['user']['email'] => $project['user']['name'], @@ -95,7 +95,7 @@ public function answerQuestion($question, $answer, $project) ); // Send notification to project manager - if (!empty($project)) { + if (!empty($project) && $project['manager'] > 0) { Pi::service('notification')->send( array( $project['user']['email'] => $project['user']['name'],