]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub.php
Simplify Contact::addRelationship call in ActivityPub\Processor::followUser
[friendica.git] / src / Protocol / ActivityPub.php
index c04b9e592debc183f60930959c7e5b7b46086c24..19eb8c8bce1159e1622ae8ac9145527c42c6a257 100644 (file)
@@ -90,20 +90,6 @@ class ActivityPub
         */
        public static function fetchContent(string $url, int $uid = 0)
        {
-               if (empty($uid)) {
-                       $user = User::getFirstAdmin(['uid']);
-               
-                       if (empty($user['uid'])) {
-                               // When the system setup is missing an admin we just take the first user
-                               $condition = ['verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false];
-                               $user = DBA::selectFirst('user', ['uid'], $condition);
-                       }
-
-                       if (!empty($user['uid'])) {
-                               $uid = $user['uid'];
-                       }
-               }
-
                return HTTPSignature::fetch($url, $uid);
        }
 
@@ -171,6 +157,7 @@ class ActivityPub
                $profile['poll'] = $apcontact['outbox'];
                $profile['pubkey'] = $apcontact['pubkey'];
                $profile['subscribe'] = $apcontact['subscribe'];
+               $profile['manually-approve'] = $apcontact['manually-approve'];
                $profile['baseurl'] = $apcontact['baseurl'];
                $profile['gsid'] = $apcontact['gsid'];