*/
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/',
$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'];
}
}
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];
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);