Fix Accept ID

This commit is contained in:
Diogo Cordeiro 2018-08-01 00:10:35 +01:00
parent a17e83582c
commit 8f6c120620
2 changed files with 10 additions and 4 deletions

View File

@ -50,10 +50,13 @@ class Activitypub_accept extends Managed_DataObject
public static function accept_to_array($object) public static function accept_to_array($object)
{ {
$res = [ $res = [
'@context' => 'https://www.w3.org/ns/activitystreams', '@context' => [
'id' => common_root_url().'follow_from_'.urlencode($object['actor']).'_to_'.urlencode($object['object']), 'https://www.w3.org/ns/activitystreams',
'actor' => $object['object'], 'https://w3id.org/security/v1'
],
'id' => common_root_url().'accept_follow_from_'.urlencode($object['actor']).'_to_'.urlencode($object['object']),
'type' => 'Accept', 'type' => 'Accept',
'actor' => $object['object'],
'object' => $object 'object' => $object
]; ];
return $res; return $res;

View File

@ -51,7 +51,10 @@ class Activitypub_follow extends Managed_DataObject
public static function follow_to_array($actor, $object) public static function follow_to_array($actor, $object)
{ {
$res = [ $res = [
'@context' => 'https://www.w3.org/ns/activitystreams', '@context' => [
'https://www.w3.org/ns/activitystreams',
'https://w3id.org/security/v1'
],
'id' => common_root_url().'follow_from_'.urlencode($actor).'_to_'.urlencode($object), 'id' => common_root_url().'follow_from_'.urlencode($actor).'_to_'.urlencode($object),
'type' => 'Follow', 'type' => 'Follow',
'actor' => $actor, 'actor' => $actor,