Add dummy id to follow

This commit is contained in:
Diogo Cordeiro 2018-07-31 21:42:17 +01:00
parent 5c26e34f5a
commit 12b1fd7b1f
1 changed files with 7 additions and 5 deletions

View File

@ -50,11 +50,13 @@ class Activitypub_follow extends Managed_DataObject
*/
public static function follow_to_array($actor, $object)
{
$res = array("@context" => "https://www.w3.org/ns/activitystreams",
"type" => "Follow",
"actor" => $actor,
"object" => $object
);
$res = [
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => common_root_url().'follow_from_'.urlencode($actor).'_to_'.urlencode($object),
'type' => 'Follow',
'actor' => $actor,
'object' => $object
];
return $res;
}
}