X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FActivityPub.php;h=134f69f4a66fd9a6d45c39cfdb063e734840471f;hb=e2dc36a691c4618589c08c5a2e743988863fd6e9;hp=0b4810627d0eeb9cd43ee8cec4c8f97c4e87115d;hpb=6f2fcd2859fe57446f39b44ad5ccac76839be57a;p=friendica.git diff --git a/src/Protocol/ActivityPub.php b/src/Protocol/ActivityPub.php index 0b4810627d..134f69f4a6 100644 --- a/src/Protocol/ActivityPub.php +++ b/src/Protocol/ActivityPub.php @@ -60,14 +60,16 @@ use Friendica\Util\JsonLD; class ActivityPub { const PUBLIC_COLLECTION = 'https://www.w3.org/ns/activitystreams#Public'; - const CONTEXT = ['https://www.w3.org/ns/activitystreams', + const CONTEXT = ['https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1', ['vcard' => 'http://www.w3.org/2006/vcard/ns#', 'dfrn' => 'http://purl.org/macgirvin/dfrn/1.0/', 'diaspora' => 'https://diasporafoundation.org/ns/', 'litepub' => 'http://litepub.social/ns#', + 'toot' => 'http://joinmastodon.org/ns#', 'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers', 'sensitive' => 'as:sensitive', 'Hashtag' => 'as:Hashtag', - 'directMessage' => 'litepub:directMessage']]; + 'directMessage' => 'litepub:directMessage', + 'discoverable' => 'toot:discoverable']]; const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application', 'Tombstone']; /** * Checks if the web request is done for the AP protocol @@ -151,6 +153,7 @@ class ActivityPub $profile['outbox'] = $apcontact['outbox']; $profile['sharedinbox'] = $apcontact['sharedinbox']; $profile['photo'] = $apcontact['photo']; + $profile['header'] = $apcontact['header']; $profile['account-type'] = self::getAccountType($apcontact); $profile['community'] = ($profile['account-type'] == User::ACCOUNT_TYPE_COMMUNITY); // $profile['keywords'] @@ -165,6 +168,10 @@ class ActivityPub $profile['baseurl'] = $apcontact['baseurl']; $profile['gsid'] = $apcontact['gsid']; + if (!is_null($apcontact['discoverable'])) { + $profile['hide'] = !$apcontact['discoverable']; + } + // Remove all "null" fields foreach ($profile as $field => $content) { if (is_null($content)) {