From: Hank Grabowski Date: Wed, 15 Feb 2023 20:40:10 +0000 (-0500) Subject: Change FollowRequest return type to be Account X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=31b746cb163528c76113d5d3098a99a237829057;p=friendica.git Change FollowRequest return type to be Account --- diff --git a/src/Factory/Api/Mastodon/FollowRequest.php b/src/Factory/Api/Mastodon/FollowRequest.php index 2b12b1dbd4..fcb2c9df8c 100644 --- a/src/Factory/Api/Mastodon/FollowRequest.php +++ b/src/Factory/Api/Mastodon/FollowRequest.php @@ -23,6 +23,7 @@ namespace Friendica\Factory\Api\Mastodon; use Friendica\App\BaseURL; use Friendica\BaseFactory; +use Friendica\Collection\Api\Mastodon\Fields; use Friendica\Contact\Introduction\Entity\Introduction; use Friendica\Database\DBA; use Friendica\Model\APContact; @@ -45,10 +46,10 @@ class FollowRequest extends BaseFactory /** * @param Introduction $introduction - * @return \Friendica\Object\Api\Mastodon\FollowRequest + * @return \Friendica\Object\Api\Mastodon\Account * @throws ImagickException|HTTPException\InternalServerErrorException */ - public function createFromIntroduction(Introduction $introduction): \Friendica\Object\Api\Mastodon\FollowRequest + public function createFromIntroduction(Introduction $introduction): \Friendica\Object\Api\Mastodon\Account { $account = DBA::selectFirst('account-user-view', [], ['id' => $introduction->cid, 'uid' => [0, $introduction->uid]]); if (empty($account)) { @@ -56,6 +57,6 @@ class FollowRequest extends BaseFactory throw new HTTPException\InternalServerErrorException('Wrong introduction data'); } - return new \Friendica\Object\Api\Mastodon\FollowRequest($this->baseUrl, $introduction->id, $account); + return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $account, new Fields()); } }