]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub.php
Simplified proxy handling
[friendica.git] / src / Protocol / ActivityPub.php
index c42dad2eb39c26dc6b6990f0e924235d05455b0a..134f69f4a66fd9a6d45c39cfdb063e734840471f 100644 (file)
@@ -65,9 +65,11 @@ class ActivityPub
                '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)) {