summaryrefslogtreecommitdiff
path: root/app/Model/NotificationModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-17 20:33:27 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-17 20:33:27 -0400
commitd9d37882228771bca0c7f53f5ffcef90ba7ac1c5 (patch)
treef5df4446273878fc0bc9bf6e6db4bef1535b9de3 /app/Model/NotificationModel.php
parentcbe52e57200a66522d88dfc5d5f46de8eb87ffb2 (diff)
Subtasks events refactoring and show delete in activity stream
Diffstat (limited to 'app/Model/NotificationModel.php')
-rw-r--r--app/Model/NotificationModel.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Model/NotificationModel.php b/app/Model/NotificationModel.php
index df481fc7..ac8d9bae 100644
--- a/app/Model/NotificationModel.php
+++ b/app/Model/NotificationModel.php
@@ -70,6 +70,8 @@ class NotificationModel extends Base
return e('%s updated a subtask for the task #%d', $event_author, $event_data['task']['id']);
case SubtaskModel::EVENT_CREATE:
return e('%s created a subtask for the task #%d', $event_author, $event_data['task']['id']);
+ case SubtaskModel::EVENT_DELETE:
+ return e('%s removed a subtask for the task #%d', $event_author, $event_data['task']['id']);
case CommentModel::EVENT_UPDATE:
return e('%s updated a comment on the task #%d', $event_author, $event_data['task']['id']);
case CommentModel::EVENT_CREATE:
@@ -110,6 +112,8 @@ class NotificationModel extends Base
return e('New subtask on task #%d', $event_data['subtask']['task_id']);
case SubtaskModel::EVENT_UPDATE:
return e('Subtask updated on task #%d', $event_data['subtask']['task_id']);
+ case SubtaskModel::EVENT_DELETE:
+ return e('Subtask removed on task #%d', $event_data['subtask']['task_id']);
case TaskModel::EVENT_CREATE:
return e('New task #%d: %s', $event_data['task']['id'], $event_data['task']['title']);
case TaskModel::EVENT_UPDATE:
@@ -157,6 +161,7 @@ class NotificationModel extends Base
return $event_data['comment']['task_id'];
case SubtaskModel::EVENT_CREATE:
case SubtaskModel::EVENT_UPDATE:
+ case SubtaskModel::EVENT_DELETE:
return $event_data['subtask']['task_id'];
case TaskModel::EVENT_CREATE:
case TaskModel::EVENT_UPDATE: