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" "@language" => "en"
] ]
], ],
'id' => $profile->getID(), 'id' => $profile->getID(),
'type' => 'Person', 'type' => 'Person',
'nickname' => $profile->getNickname (), 'nickname' => $profile->getNickname (),
'is_local' => $profile->isLocal(), 'is_local' => $profile->isLocal(),
'inbox' => "{$url}/inbox.json", 'inbox' => "{$url}/inbox.json",
'outbox' => "{$url}/outbox.json", 'outbox' => "{$url}/outbox.json",
'display_name' => $profile->getFullname(), 'display_name' => $profile->getFullname(),
'followers' => "{$url}/followers.json", 'followers' => "{$url}/followers.json",
'following' => "{$url}/following.json", 'followers_count' => $profile->subscriberCount(),
'liked' => "{$url}/liked.json", 'following' => "{$url}/following.json",
'liked_count' => Fave::countByProfile ($profile), 'following_count' => $profile->subscriptionCount(),
'summary' => $profile->getDescription(), 'liked' => "{$url}/liked.json",
'url' => $profile->getURL(), 'liked_count' => Fave::countByProfile ($profile),
'avatar' => [ 'summary' => $profile->getDescription(),
'url' => $profile->getURL(),
'avatar' => [
'type' => 'Image', 'type' => 'Image',
'width' => 96, 'width' => 96,
'height' => 96, 'height' => 96,