mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00:00
Rename Api\Mastodon\Account::createFromContact to just create
- Retrieve public contact in Api\Mastodon\FollowRequests instead of user contact
This commit is contained in:
parent
9ed8479b32
commit
cb7875b035
4 changed files with 15 additions and 10 deletions
|
@ -87,9 +87,14 @@ class FollowRequests extends Api
|
|||
|
||||
$return = [];
|
||||
foreach ($intros as $intro) {
|
||||
$contact = Contact::getById($intro['contact-id']);
|
||||
$apcontact = APContact::getByURL($contact['url'], false);
|
||||
$account = Mastodon\Account::createFromContact($contact, $apcontact);
|
||||
$cdata = Contact::getPublicAndUserContacID($intro['contact-id'], $intro['uid']);
|
||||
if (empty($cdata['public'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$publicContact = Contact::getById($cdata['public']);
|
||||
$apcontact = APContact::getByURL($publicContact['url'], false);
|
||||
$account = Mastodon\Account::create($publicContact, $apcontact);
|
||||
|
||||
// Not ideal, the same "account" can have multiple ids depending on the context
|
||||
$account->id = $intro['id'];
|
||||
|
|
|
@ -13,7 +13,7 @@ class Instance extends Api
|
|||
{
|
||||
/**
|
||||
* @param array $parameters
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue