mirror of
https://github.com/friendica/friendica
synced 2024-12-05 14:52:53 +01:00
API: Provide data for the account array of the instance array
This commit is contained in:
parent
5197833c55
commit
da78b7a8b8
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue