<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
*/
const ANNOUNCE = ActivityNamespace::ACTIVITY2 . 'Announce';
+ const O_UNFOLLOW = ActivityNamespace::OSTATUS . '/unfollow';
+ const O_UNFAVOURITE = ActivityNamespace::OSTATUS . '/unfavorite';
+
/**
- * Pokes an user.
+ * React to a post via an emoji
*
- * @see https://github.com/friendica/friendica/wiki/ActivityStreams#activity_poke
* @var string
*/
- const POKE = ActivityNamespace::ZOT . '/activity/poke';
+ const EMOJIREACT = ActivityNamespace::LITEPUB . '/emojireact';
-
- const O_UNFOLLOW = ActivityNamespace::OSTATUS . '/unfollow';
- const O_UNFAVOURITE = ActivityNamespace::OSTATUS . '/unfavorite';
+ /**
+ * 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,
* Hidden activities, which doesn't need to be shown
*/
const HIDDEN_ACTIVITIES = [
- Activity::LIKE, Activity::DISLIKE,
- Activity::ATTEND, Activity::ATTENDNO, Activity::ATTENDMAYBE,
- Activity::FOLLOW,
- Activity::ANNOUNCE,
+ self::LIKE, self::DISLIKE,
+ self::ATTEND, self::ATTENDNO, self::ATTENDMAYBE,
+ 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) &&