aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/appinfo
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-16 11:39:06 +0100
committerJoas Schilling <coding@schilljs.com>2016-11-16 12:20:03 +0100
commit8105ba99297222b7db97b556a55f306c3f7cabc0 (patch)
treee0392886e9326015a690d31461394b5ea7c64d6f /apps/comments/appinfo
parent81e9836900139d2fda65fa833e735a62e637ab3b (diff)
downloadnextcloud-server-8105ba99297222b7db97b556a55f306c3f7cabc0.tar.gz
nextcloud-server-8105ba99297222b7db97b556a55f306c3f7cabc0.zip
Move comments activities to the new API
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/comments/appinfo')
-rw-r--r--apps/comments/appinfo/app.php10
-rw-r--r--apps/comments/appinfo/info.xml14
2 files changed, 15 insertions, 9 deletions
diff --git a/apps/comments/appinfo/app.php b/apps/comments/appinfo/app.php
index 66e60dbbd85..144a4506d38 100644
--- a/apps/comments/appinfo/app.php
+++ b/apps/comments/appinfo/app.php
@@ -37,14 +37,6 @@ $eventDispatcher->addListener(
}
);
-$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::class);
- return $extension;
-});
-
$eventDispatcher->addListener(\OCP\Comments\CommentsEntityEvent::EVENT_ENTITY, function(\OCP\Comments\CommentsEntityEvent $event) {
$event->addEntityCollection('files', function($name) {
$nodes = \OC::$server->getUserFolder()->getById(intval($name));
@@ -67,7 +59,7 @@ $notificationManager->registerNotifier(
$commentsManager = \OC::$server->getCommentsManager();
$commentsManager->registerEventHandler(function () {
$application = new \OCP\AppFramework\App('comments');
- /** @var \OCA\Comments\Activity\Extension $extension */
+ /** @var \OCA\Comments\EventHandler $handler */
$handler = $application->getContainer()->query(\OCA\Comments\EventHandler::class);
return $handler;
});
diff --git a/apps/comments/appinfo/info.xml b/apps/comments/appinfo/info.xml
index 1c0a38e5668..9d5409a2d62 100644
--- a/apps/comments/appinfo/info.xml
+++ b/apps/comments/appinfo/info.xml
@@ -13,4 +13,18 @@
<types>
<logging/>
</types>
+
+ <activity>
+ <settings>
+ <setting>OCA\Comments\Activity\Setting</setting>
+ </settings>
+
+ <filters>
+ <filter>OCA\Comments\Activity\Filter</filter>
+ </filters>
+
+ <providers>
+ <provider>OCA\Comments\Activity\Provider</provider>
+ </providers>
+ </activity>
</info>