]> git.mxchange.org Git - friendica.git/commitdiff
API: Provide data for the account array of the instance array
authorMichael <heluecht@pirati.ca>
Thu, 19 Dec 2019 04:11:31 +0000 (04:11 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 19 Dec 2019 04:11:31 +0000 (04:11 +0000)
src/Api/Mastodon/Instance.php

index 890c83c092d4b2a8ca1460c37d09013ff9a45bd1..0e9142e5f44f14726f1fccf3750822ce3043eab9 100644 (file)
@@ -7,11 +7,12 @@ use Friendica\Api\Mastodon\Account;
 use Friendica\Api\Mastodon\Stats;
 use Friendica\Core\Config;
 use Friendica\Database\DBA;
+use Friendica\Model\APContact;
 use Friendica\Model\User;
 use Friendica\Module\Register;
 
 /**
- * Class Account
+ * Class Instance
  *
  * @see https://docs.joinmastodon.org/api/entities/#instance
  */
@@ -75,7 +76,8 @@ class Instance
                        $administrator = User::getByEmail($adminList[0], ['nickname']);
                        if (!empty($administrator)) {
                                $adminContact = DBA::selectFirst('contact', [], ['nick' => $administrator['nickname'], 'self' => true]);
-                               $instance->contact_account = Account::createFromContact($adminContact);
+                               $apcontact = APContact::getByURL($adminContact['url'], false);
+                               $instance->contact_account = Account::createFromContact($adminContact, $apcontact);
                        }
                }