diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-10-12 18:06:22 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-10-12 18:06:22 +0200 |
commit | 1bcd2ca8e35dca6e68e5f06506ade0a78a2beae8 (patch) | |
tree | e1af5850f05bfd165c3542f0b50a49fe623452c0 /apps/comments/lib/Notification | |
parent | a9671a4dc2cc904ebb852c7804204ac9f245017e (diff) | |
download | nextcloud-server-1bcd2ca8e35dca6e68e5f06506ade0a78a2beae8.tar.gz nextcloud-server-1bcd2ca8e35dca6e68e5f06506ade0a78a2beae8.zip |
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 <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/comments/lib/Notification')
-rw-r--r-- | apps/comments/lib/Notification/Listener.php | 4 |
1 files changed, 3 insertions, 1 deletions
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); |