Skip to content

Commit

Permalink
Merge pull request #903 from nextcloud/allow-disable-comments
Browse files Browse the repository at this point in the history
Revert "Always add activities for comments to the stream"
  • Loading branch information
MorrisJobke authored Aug 18, 2016
2 parents ab5bd81 + af46b64 commit 6d7c5e2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions apps/comments/lib/Activity/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function getNotificationTypes($languageCode) {

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],
],
);
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6d7c5e2

Please sign in to comment.