Update endpoint URLs and lack of variable declaration fix

This commit is contained in:
Diogo Cordeiro 2018-05-05 01:32:27 +01:00
parent be73d6bdf6
commit 95fd0a75c4

View File

@ -35,6 +35,7 @@ class Activitypub_profile extends Managed_DataObject
public static function profileToObject($profile)
{
$url = $profile->getURL ();
$res = [
'@context' => [
"https://www.w3.org/ns/activitystreams",
@ -49,8 +50,8 @@ class Activitypub_profile extends Managed_DataObject
'inbox' => "{$url}/inbox.json",
'outbox' => "{$url}/outbox.json",
'display_name' => $profile->getFullname(),
'followers' => "{$url}/subscribers",
'following' => "{$url}/subscriptions",
'followers' => "{$url}/followers.json",
'following' => "{$url}/following.json",
'liked' => "{$url}/liked.json",
'liked_count' => Fave::countByProfile ($profile),
'summary' => $profile->getDescription(),