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

@ -51,7 +51,9 @@ class Activitypub_profile extends Managed_DataObject
'outbox' => "{$url}/outbox.json", 'outbox' => "{$url}/outbox.json",
'display_name' => $profile->getFullname(), 'display_name' => $profile->getFullname(),
'followers' => "{$url}/followers.json", 'followers' => "{$url}/followers.json",
'followers_count' => $profile->subscriberCount(),
'following' => "{$url}/following.json", 'following' => "{$url}/following.json",
'following_count' => $profile->subscriptionCount(),
'liked' => "{$url}/liked.json", 'liked' => "{$url}/liked.json",
'liked_count' => Fave::countByProfile ($profile), 'liked_count' => Fave::countByProfile ($profile),
'summary' => $profile->getDescription(), 'summary' => $profile->getDescription(),