Skip to content

Commit

Permalink
Always add activities for comments to the stream
Browse files Browse the repository at this point in the history
  • Loading branch information
nickvergessen committed Apr 11, 2016
1 parent c6f65a3 commit 48c41b8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apps/comments/activity/extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ public function getNotificationTypes($languageCode) {
$l = $this->getL10N($languageCode);

return array(
self::APP_NAME => (string) $l->t('<strong>Comments</strong> for files'),
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
],
);
}

Expand Down Expand Up @@ -274,7 +277,11 @@ public function isFilterValid($filterValue) {
*/
public function filterNotificationTypes($types, $filter) {
if ($filter === self::APP_NAME) {
return array_intersect($types, [self::APP_NAME]);
return [self::APP_NAME];
}
if (in_array($filter, ['all', 'by', 'self', 'filter'])) {
$types[] = self::APP_NAME;
return $types;
}
return false;
}
Expand Down

0 comments on commit 48c41b8

Please sign in to comment.