Add following/followers to ActivityPubActor action

This commit is contained in:
Daniel Supernault 2018-03-25 14:55:14 -06:00
parent d44a5974da
commit 839e1f01af
1 changed files with 12 additions and 6 deletions

View File

@ -38,21 +38,27 @@ class ActivityPubActorAction extends ManagedAction
{
$user = User::getByID($this->trimmed('id'));
$profile = $user->getProfile();
$url = $profile->profileurl;
$res = [
'@context' => ["https://www.w3.org/ns/activitystreams"],
'id' => $profile->profileurl,
'@context' => [
"https://www.w3.org/ns/activitystreams",
[
"@language" => "en"
]
],
'id' => $url,
'type' => 'Person',
'following' => null,
'followers' => null,
'following' => "{$url}/subscriptions",
'followers' => "{$url}/subscribers",
'inbox' => null,
'outbox' => null,
'liked' => null,
'liked' => "{$url}/favorites",
'featured' => null,
'preferredUsername' => $user->nickname,
'name' => $user->nickname,
'summary' => $profile->bio,
'url' => $profile->profileurl
'url' => $url
];
header('Content-Type: application/json');