From b043c7e0f2658e32d19ccd61120df6994d8e555a Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 28 Sep 2018 15:25:20 +0000 Subject: [PATCH] Changed constant name to keep compatible with PHP 5 --- src/Protocol/ActivityPub.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Protocol/ActivityPub.php b/src/Protocol/ActivityPub.php index ce960e10d3..a02031f003 100644 --- a/src/Protocol/ActivityPub.php +++ b/src/Protocol/ActivityPub.php @@ -75,7 +75,7 @@ use Friendica\Core\Config; */ class ActivityPub { - const PUBLIC = 'https://www.w3.org/ns/activitystreams#Public'; + const PUBLIC_COLLECTION = 'https://www.w3.org/ns/activitystreams#Public'; const CONTEXT = ['https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1', ['vcard' => 'http://www.w3.org/2006/vcard/ns#', 'diaspora' => 'https://diasporafoundation.org/ns/', @@ -364,7 +364,7 @@ class ActivityPub $contacts[$item['author-link']] = $item['author-link']; if (!$item['private']) { - $data['to'][] = self::PUBLIC; + $data['to'][] = self::PUBLIC_COLLECTION; if (!empty($actor_profile['followers'])) { $data['cc'][] = $actor_profile['followers']; } @@ -1172,11 +1172,11 @@ class ActivityPub } foreach ($activity[$element] as $receiver) { - if ($receiver == self::PUBLIC) { + if ($receiver == self::PUBLIC_COLLECTION) { $receivers['uid:0'] = 0; } - if (($receiver == self::PUBLIC) && !empty($actor)) { + if (($receiver == self::PUBLIC_COLLECTION) && !empty($actor)) { // This will most likely catch all OStatus connections to Mastodon $condition = ['alias' => [$actor, normalise_link($actor)], 'rel' => [Contact::SHARING, Contact::FRIEND] , 'archive' => false, 'pending' => false]; @@ -1189,7 +1189,7 @@ class ActivityPub DBA::close($contacts); } - if (in_array($receiver, [$followers, self::PUBLIC]) && !empty($actor)) { + if (in_array($receiver, [$followers, self::PUBLIC_COLLECTION]) && !empty($actor)) { $condition = ['nurl' => normalise_link($actor), 'rel' => [Contact::SHARING, Contact::FRIEND], 'network' => Protocol::ACTIVITYPUB, 'archive' => false, 'pending' => false]; $contacts = DBA::select('contact', ['uid'], $condition); -- 2.39.5