*/
const EMOJIREACT = ActivityNamespace::LITEPUB . '/emojireact';
+ /**
+ * View notification from Peertube
+ *
+ * @var string
+ */
+ const VIEW = ActivityNamespace::PEERTUBE . '/view';
+
/**
* likes (etc.) can apply to other things besides posts. Check if they are post children,
* in which case we handle them specially
self::FOLLOW,
self::ANNOUNCE,
self::EMOJIREACT,
+ self::VIEW,
];
/**
*
* @return bool True, if the activity is hidden
*/
- public function isHidden(string $activity)
+ public function isHidden(string $activity): bool
{
foreach (self::HIDDEN_ACTIVITIES as $hiddenActivity) {
if ($this->match($activity, $hiddenActivity)) {
*
* @return boolean
*/
- public function match(string $haystack, string $needle)
+ public function match(string $haystack, string $needle): bool
{
return (($haystack === $needle) ||
((basename($needle) === $haystack) &&