Merge pull request #904 from nextcloud/backport-903-allow-disable-comments

[stable10] Revert "Always add activities for comments to the stream"
This commit is contained in:
Lukas Reschke 2016-08-18 12:06:11 +02:00 committed by GitHub
commit 3ac524c420
1 changed files with 3 additions and 7 deletions

View File

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