diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-24 13:23:44 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-23 09:03:48 +0200 |
commit | c9fda848411d3369d39201a4ebcf8505fb70adce (patch) | |
tree | 55a2a7a4a5a83cdef579910d04ad2665d41d4fd3 /apps/comments | |
parent | 3a8e537946363dcbcfe07ead5e8979aef5fafcd9 (diff) | |
download | nextcloud-server-c9fda848411d3369d39201a4ebcf8505fb70adce.tar.gz nextcloud-server-c9fda848411d3369d39201a4ebcf8505fb70adce.zip |
Make the root collection neutral so it does not only work for files
Diffstat (limited to 'apps/comments')
-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); + }); +}); |