]> source.dussan.org Git - nextcloud-server.git/commitdiff
Revert "Always add activities for comments to the stream" 904/head
authorJoas Schilling <coding@schilljs.com>
Wed, 17 Aug 2016 11:30:32 +0000 (13:30 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 17 Aug 2016 11:33:53 +0000 (13:33 +0200)
This reverts commit 48c41b888c6a464f645de3e9087a39c163086d9f

apps/comments/lib/Activity/Extension.php

index 6e5ac894c0f750bb9ed722a2ab61a7c4f293fc64..0a7503c191540f35e9833c9ec34e1c8b0a4884c0 100644 (file)
@@ -82,8 +82,8 @@ class Extension implements IExtension {
 
                return array(
                        self::APP_NAME => [
-                               'desc' => (string) $l->t('<strong>Comments</strong> for files <em>(always listed in stream)</em>'),
-                               'methods' => [self::METHOD_MAIL], // self::METHOD_STREAM is forced true by the default value
+                               'desc' => (string) $l->t('<strong>Comments</strong> for files'),
+                               'methods' => [self::METHOD_MAIL, self::METHOD_STREAM],
                        ],
                );
        }
@@ -278,11 +278,7 @@ class Extension implements IExtension {
         */
        public function filterNotificationTypes($types, $filter) {
                if ($filter === self::APP_NAME) {
-                       return [self::APP_NAME];
-               }
-               if (in_array($filter, ['all', 'by', 'self', 'filter'])) {
-                       $types[] = self::APP_NAME;
-                       return $types;
+                       return array_intersect($types, [self::APP_NAME]);
                }
                return false;
        }