mirror of
https://github.com/friendica/friendica
synced 2025-04-26 07:50:15 +00:00
Improve Api\Mastodon\Account with data from apcontact
- Original work by @annando
This commit is contained in:
parent
cf72bde93d
commit
9a0a11ed39
2 changed files with 26 additions and 20 deletions
|
@ -6,6 +6,7 @@ use Friendica\Api\Mastodon;
|
|||
use Friendica\App\BaseURL;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\APContact;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Introduction;
|
||||
use Friendica\Module\Base\Api;
|
||||
|
@ -88,7 +89,9 @@ class FollowRequests extends Api
|
|||
|
||||
$return = [];
|
||||
foreach ($intros as $intro) {
|
||||
$account = Mastodon\Account::createFromContact(Contact::getById($intro['contact-id']));
|
||||
$contact = Contact::getById($intro['contact-id']);
|
||||
$apcontact = APContact::getByURL($contact['url'], false);
|
||||
$account = Mastodon\Account::createFromContact($contact, $apcontact);
|
||||
|
||||
// Not ideal, the same "account" can have multiple ids depending on the context
|
||||
$account->id = $intro['id'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue