Publish the profile fields

This commit is contained in:
Michael 2020-10-25 18:21:18 +00:00
parent 463f8ee3f3
commit 319ceeda3b
2 changed files with 5 additions and 2 deletions

View file

@ -69,7 +69,10 @@ class Account extends BaseFactory
$apcontact = APContact::getByURL($publicContact['url'], false);
return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $publicContact, new Fields(), $apcontact, $userContact);
$profileFields = $this->profileField->select(['uid' => $uid, 'psid' => PermissionSet::PUBLIC]);
$fields = $this->mstdnField->createFromProfileFields($profileFields);
return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $publicContact, $fields, $apcontact, $userContact);
}
/**

View file

@ -37,7 +37,7 @@ class Field extends BaseFactory
*/
public function createFromProfileField(ProfileField $profileField)
{
return new \Friendica\Api\Entity\Mastodon\Field($profileField->label, BBCode::convert($profileField->value, false, BBCode::ACTIVITYPUB));
return new \Friendica\Object\Api\Mastodon\Field($profileField->label, BBCode::convert($profileField->value, false, BBCode::ACTIVITYPUB));
}
/**