From 1bcd2ca8e35dca6e68e5f06506ade0a78a2beae8 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 12 Oct 2016 18:06:22 +0200 Subject: emit pre-update event for comments * notifications can be cleaned up, no polluted DB * updating comments will re-notify users or remove notifications, depending on the message Signed-off-by: Arthur Schiwon --- apps/comments/lib/Notification/Listener.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/comments/lib/Notification') diff --git a/apps/comments/lib/Notification/Listener.php b/apps/comments/lib/Notification/Listener.php index 5e979fd9bf0..68705085023 100644 --- a/apps/comments/lib/Notification/Listener.php +++ b/apps/comments/lib/Notification/Listener.php @@ -85,7 +85,9 @@ class Listener { } $notification->setUser($user); - if($event->getEvent() === CommentsEvent::EVENT_DELETE) { + if( $event->getEvent() === CommentsEvent::EVENT_DELETE + || $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE) + { $this->notificationManager->markProcessed($notification); } else { $this->notificationManager->notify($notification); -- cgit v1.2.3