From af46b64ef2f14ac3ce5a21b7d195d701e57f6b02 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 Aug 2016 13:30:32 +0200 Subject: [PATCH] Revert "Always add activities for comments to the stream" This reverts commit 48c41b888c6a464f645de3e9087a39c163086d9f --- apps/comments/lib/Activity/Extension.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/comments/lib/Activity/Extension.php b/apps/comments/lib/Activity/Extension.php index 6e5ac894c0f75..0a7503c191540 100644 --- a/apps/comments/lib/Activity/Extension.php +++ b/apps/comments/lib/Activity/Extension.php @@ -82,8 +82,8 @@ public function getNotificationTypes($languageCode) { return array( self::APP_NAME => [ - 'desc' => (string) $l->t('Comments for files (always listed in stream)'), - 'methods' => [self::METHOD_MAIL], // self::METHOD_STREAM is forced true by the default value + 'desc' => (string) $l->t('Comments for files'), + 'methods' => [self::METHOD_MAIL, self::METHOD_STREAM], ], ); } @@ -278,11 +278,7 @@ public function isFilterValid($filterValue) { */ 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; }