diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-05 11:20:16 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-05 11:30:53 +0100 |
commit | 070ff71a2d18aa0f94fac51c2caecdcea963887e (patch) | |
tree | 1ef71f6e4e55faffd4cdf6bd81b8588e5e12ec86 /apps/comments/appinfo | |
parent | e86dcdacc8b1167a461b399c39c8aaf556ee4a7c (diff) | |
download | nextcloud-server-070ff71a2d18aa0f94fac51c2caecdcea963887e.tar.gz nextcloud-server-070ff71a2d18aa0f94fac51c2caecdcea963887e.zip |
Add activities for comments
Diffstat (limited to 'apps/comments/appinfo')
-rw-r--r-- | apps/comments/appinfo/app.php | 17 | ||||
-rw-r--r-- | apps/comments/appinfo/info.xml | 5 |
2 files changed, 21 insertions, 1 deletions
diff --git a/apps/comments/appinfo/app.php b/apps/comments/appinfo/app.php index a1eb4f6899d..e76f598c807 100644 --- a/apps/comments/appinfo/app.php +++ b/apps/comments/appinfo/app.php @@ -33,3 +33,20 @@ $eventDispatcher->addListener( \OCP\Util::addStyle('comments', 'comments'); } ); + +$activityManager = \OC::$server->getActivityManager(); +$activityManager->registerExtension(function() { + $application = new \OCP\AppFramework\App('comments'); + /** @var \OCA\Comments\Activity\Extension $extension */ + $extension = $application->getContainer()->query('OCA\Comments\Activity\Extension'); + return $extension; +}); + +$managerListener = function(\OCP\Comments\CommentsEvent $event) use ($activityManager) { + $application = new \OCP\AppFramework\App('comments'); + /** @var \OCA\Comments\Activity\Listener $listener */ + $listener = $application->getContainer()->query('OCA\Comments\Activity\Listener'); + $listener->commentEvent($event); +}; + +$eventDispatcher->addListener(\OCP\Comments\CommentsEvent::EVENT_ADD, $managerListener); diff --git a/apps/comments/appinfo/info.xml b/apps/comments/appinfo/info.xml index f3693150639..2003fc5c096 100644 --- a/apps/comments/appinfo/info.xml +++ b/apps/comments/appinfo/info.xml @@ -6,8 +6,11 @@ <licence>AGPL</licence> <author>Arthur Shiwon, Vincent Petry</author> <default_enable/> - <version>0.1</version> + <version>0.2</version> <dependencies> <owncloud min-version="9.0" max-version="9.0" /> </dependencies> + <types> + <logging/> + </types> </info> |