Add ID to Like and Undo
This commit is contained in:
parent
83f5c513b4
commit
aac82c7b2a
@ -55,6 +55,7 @@ class Activitypub_like extends Managed_DataObject
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'id' => common_root_url().'like_from_'.urlencode($actor).'_to_'.urlencode($object),
|
||||
"type" => "Like",
|
||||
"actor" => $actor,
|
||||
"object" => $object
|
||||
|
@ -49,11 +49,16 @@ class Activitypub_undo extends Managed_DataObject
|
||||
*/
|
||||
public static function undo_to_array($object)
|
||||
{
|
||||
$res = array("@context" => "https://www.w3.org/ns/activitystreams",
|
||||
"type" => "Undo",
|
||||
"actor" => $object["actor"],
|
||||
"object" => $object
|
||||
);
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'id' => $object['id'].'/undo',
|
||||
'type' => 'Undo',
|
||||
'actor' => $object['actor'],
|
||||
'object' => $object
|
||||
];
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user