From: Michael Date: Sun, 7 Oct 2018 17:35:43 +0000 (+0000) Subject: owner is now actor X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1efca1b75db472b743c15f5a3307895af30fd1e7;p=friendica.git owner is now actor --- diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index b798b1f2b2..74d4416f1e 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -153,7 +153,7 @@ class Processor */ public static function deleteItem($activity) { - $owner = Contact::getIdForURL($activity['owner']); + $owner = Contact::getIdForURL($activity['actor']); $object = JsonLD::fetchElement($activity, 'object'); logger('Deleting item ' . $object . ' from ' . $owner, LOGGER_DEBUG); Item::delete(['uri' => $object, 'owner-id' => $owner]); @@ -195,7 +195,7 @@ class Processor $item['network'] = Protocol::ACTIVITYPUB; $item['private'] = !in_array(0, $activity['receiver']); $item['author-id'] = Contact::getIdForURL($activity['author'], 0, true); - $item['owner-id'] = Contact::getIdForURL($activity['owner'], 0, true); + $item['owner-id'] = Contact::getIdForURL($activity['actor'], 0, true); $item['uri'] = $activity['id']; $item['created'] = $activity['published']; $item['edited'] = $activity['updated']; @@ -281,18 +281,18 @@ class Processor $owner = User::getOwnerDataById($uid); - $cid = Contact::getIdForURL($activity['owner'], $uid); + $cid = Contact::getIdForURL($activity['actor'], $uid); if (!empty($cid)) { $contact = DBA::selectFirst('contact', [], ['id' => $cid, 'network' => Protocol::NATIVE_SUPPORT]); } else { $contact = false; } - $item = ['author-id' => Contact::getIdForURL($activity['owner']), - 'author-link' => $activity['owner']]; + $item = ['author-id' => Contact::getIdForURL($activity['actor']), + 'author-link' => $activity['actor']]; Contact::addRelationship($owner, $contact, $item); - $cid = Contact::getIdForURL($activity['owner'], $uid); + $cid = Contact::getIdForURL($activity['actor'], $uid); if (empty($cid)) { return; } @@ -366,9 +366,9 @@ class Processor $owner = User::getOwnerDataById($uid); - $cid = Contact::getIdForURL($activity['owner'], $uid); + $cid = Contact::getIdForURL($activity['actor'], $uid); if (empty($cid)) { - logger('No contact found for ' . $activity['owner'], LOGGER_DEBUG); + logger('No contact found for ' . $activity['actor'], LOGGER_DEBUG); return; } @@ -399,9 +399,9 @@ class Processor $owner = User::getOwnerDataById($uid); - $cid = Contact::getIdForURL($activity['owner'], $uid); + $cid = Contact::getIdForURL($activity['actor'], $uid); if (empty($cid)) { - logger('No contact found for ' . $activity['owner'], LOGGER_DEBUG); + logger('No contact found for ' . $activity['actor'], LOGGER_DEBUG); return; } @@ -453,9 +453,9 @@ class Processor $owner = User::getOwnerDataById($uid); - $cid = Contact::getIdForURL($activity['owner'], $uid); + $cid = Contact::getIdForURL($activity['actor'], $uid); if (empty($cid)) { - logger('No contact found for ' . $activity['owner'], LOGGER_DEBUG); + logger('No contact found for ' . $activity['actor'], LOGGER_DEBUG); return; } diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index 28f0673fab..1a261d2bfd 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -178,7 +178,7 @@ class Receiver $object_data = self::addActivityFields($object_data, $ldactivity); $object_data['type'] = $type; - $object_data['owner'] = $actor; + $object_data['actor'] = $actor; $object_data['receiver'] = array_merge(defaults($object_data, 'receiver', []), $receivers); logger('Processing ' . $object_data['type'] . ' ' . $object_data['object_type'] . ' ' . $object_data['id'], LOGGER_DEBUG); @@ -609,7 +609,7 @@ class Receiver $object_data['diaspora:guid'] = JsonLD::fetchElement($object, 'diaspora:guid'); $object_data['diaspora:comment'] = JsonLD::fetchElement($object, 'diaspora:comment'); - $object_data['owner'] = $object_data['author'] = $actor; + $object_data['actor'] = $object_data['author'] = $actor; $object_data['context'] = JsonLD::fetchElement($object, 'as:context'); $object_data['conversation'] = JsonLD::fetchElement($object, 'ostatus:conversation'); $object_data['sensitive'] = JsonLD::fetchElement($object, 'as:sensitive'); @@ -633,7 +633,7 @@ class Receiver } } - $object_data['receiver'] = self::getReceivers($object, $object_data['owner']); + $object_data['receiver'] = self::getReceivers($object, $object_data['actor']); // Common object data: