Added followers and following count on Profile entity

This commit is contained in:
Diogo Cordeiro 2018-05-10 16:26:22 +00:00
parent ea233925a8
commit 370e2320a4

View File

@ -43,20 +43,22 @@ class Activitypub_profile extends Managed_DataObject
"@language" => "en"
]
],
'id' => $profile->getID(),
'type' => 'Person',
'nickname' => $profile->getNickname (),
'is_local' => $profile->isLocal(),
'inbox' => "{$url}/inbox.json",
'outbox' => "{$url}/outbox.json",
'display_name' => $profile->getFullname(),
'followers' => "{$url}/followers.json",
'following' => "{$url}/following.json",
'liked' => "{$url}/liked.json",
'liked_count' => Fave::countByProfile ($profile),
'summary' => $profile->getDescription(),
'url' => $profile->getURL(),
'avatar' => [
'id' => $profile->getID(),
'type' => 'Person',
'nickname' => $profile->getNickname (),
'is_local' => $profile->isLocal(),
'inbox' => "{$url}/inbox.json",
'outbox' => "{$url}/outbox.json",
'display_name' => $profile->getFullname(),
'followers' => "{$url}/followers.json",
'followers_count' => $profile->subscriberCount(),
'following' => "{$url}/following.json",
'following_count' => $profile->subscriptionCount(),
'liked' => "{$url}/liked.json",
'liked_count' => Fave::countByProfile ($profile),
'summary' => $profile->getDescription(),
'url' => $profile->getURL(),
'avatar' => [
'type' => 'Image',
'width' => 96,
'height' => 96,