diff options
Diffstat (limited to 'apps/comments/appinfo/app.php')
-rw-r--r-- | apps/comments/appinfo/app.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/comments/appinfo/app.php b/apps/comments/appinfo/app.php index cd1ccb2d7d3..b060a5db1ca 100644 --- a/apps/comments/appinfo/app.php +++ b/apps/comments/appinfo/app.php @@ -51,3 +51,10 @@ $managerListener = function(\OCP\Comments\CommentsEvent $event) use ($activityMa }; $eventDispatcher->addListener(\OCP\Comments\CommentsEvent::EVENT_ADD, $managerListener); + +$eventDispatcher->addListener(\OCP\Comments\CommentsEntityEvent::EVENT_ENTITY, function(\OCP\Comments\CommentsEntityEvent $event) { + $event->addEntityCollection('files', function($name) { + $nodes = \OC::$server->getUserFolder()->getById(intval($name)); + return !empty($nodes); + }); +}); |