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://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1'
|
'https://w3id.org/security/v1'
|
||||||
],
|
],
|
||||||
|
'id' => common_root_url().'like_from_'.urlencode($actor).'_to_'.urlencode($object),
|
||||||
"type" => "Like",
|
"type" => "Like",
|
||||||
"actor" => $actor,
|
"actor" => $actor,
|
||||||
"object" => $object
|
"object" => $object
|
||||||
|
@ -49,11 +49,16 @@ class Activitypub_undo extends Managed_DataObject
|
|||||||
*/
|
*/
|
||||||
public static function undo_to_array($object)
|
public static function undo_to_array($object)
|
||||||
{
|
{
|
||||||
$res = array("@context" => "https://www.w3.org/ns/activitystreams",
|
$res = [
|
||||||
"type" => "Undo",
|
'@context' => [
|
||||||
"actor" => $object["actor"],
|
'https://www.w3.org/ns/activitystreams',
|
||||||
"object" => $object
|
'https://w3id.org/security/v1'
|
||||||
);
|
],
|
||||||
|
'id' => $object['id'].'/undo',
|
||||||
|
'type' => 'Undo',
|
||||||
|
'actor' => $object['actor'],
|
||||||
|
'object' => $object
|
||||||
|
];
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user