diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-08-18 16:51:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-18 16:51:42 +0200 |
commit | 6d7c5e226563c8a22f1031da3f82fa2ccc7c1a1f (patch) | |
tree | 42ea58b5e2fad32d5319701f0f0b7de91611c378 | |
parent | ab5bd8102086f038f304f75559c6bb336dfcd0f6 (diff) | |
parent | af46b64ef2f14ac3ce5a21b7d195d701e57f6b02 (diff) | |
download | nextcloud-server-6d7c5e226563c8a22f1031da3f82fa2ccc7c1a1f.tar.gz nextcloud-server-6d7c5e226563c8a22f1031da3f82fa2ccc7c1a1f.zip |
Merge pull request #903 from nextcloud/allow-disable-comments
Revert "Always add activities for comments to the stream"
-rw-r--r-- | apps/comments/lib/Activity/Extension.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/comments/lib/Activity/Extension.php b/apps/comments/lib/Activity/Extension.php index 6e5ac894c0f..0a7503c1915 100644 --- a/apps/comments/lib/Activity/Extension.php +++ b/apps/comments/lib/Activity/Extension.php @@ -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; } |