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;
/**
* @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)) {
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());
}
}