mirror of
https://github.com/friendica/friendica
synced 2025-04-27 11:10:12 +00:00
Update the Introductions domain to use repository, model and collection
This commit is contained in:
parent
5a1abb8c7d
commit
6b8db5ad13
8 changed files with 124 additions and 86 deletions
|
@ -23,17 +23,17 @@ class FollowRequest extends BaseFactory
|
|||
}
|
||||
|
||||
/**
|
||||
* @param Introduction $Introduction
|
||||
* @param Introduction $introduction
|
||||
* @return \Friendica\Api\Entity\Mastodon\FollowRequest
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public function createFromIntroduction(Introduction $Introduction)
|
||||
public function createFromIntroduction(Introduction $introduction)
|
||||
{
|
||||
$cdata = Contact::getPublicAndUserContacID($Introduction->{'contact-id'}, $Introduction->uid);
|
||||
$cdata = Contact::getPublicAndUserContacID($introduction->{'contact-id'}, $introduction->uid);
|
||||
|
||||
if (empty($cdata)) {
|
||||
$this->logger->warning('Wrong introduction data', ['Introduction' => $Introduction]);
|
||||
$this->logger->warning('Wrong introduction data', ['Introduction' => $introduction]);
|
||||
throw new HTTPException\InternalServerErrorException('Wrong introduction data');
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,6 @@ class FollowRequest extends BaseFactory
|
|||
|
||||
$apcontact = APContact::getByURL($publicContact['url'], false);
|
||||
|
||||
return new \Friendica\Api\Entity\Mastodon\FollowRequest($this->baseUrl, $Introduction->id, $publicContact, $apcontact, $userContact);
|
||||
return new \Friendica\Api\Entity\Mastodon\FollowRequest($this->baseUrl, $introduction->id, $publicContact, $apcontact, $userContact);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue