]> git.mxchange.org Git - friendica.git/commitdiff
owner is now actor
authorMichael <heluecht@pirati.ca>
Sun, 7 Oct 2018 17:35:43 +0000 (17:35 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 7 Oct 2018 17:35:43 +0000 (17:35 +0000)
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Receiver.php

index b798b1f2b2047796f1838012dd3668c945813064..74d4416f1e8546009405d61dca7fad7c05d67ce6 100644 (file)
@@ -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;
                }
 
index 28f0673fab7699b0cd7da48de682b49dc7f42977..1a261d2bfd4222dcdb06f99ac12a234d1c4b1db2 100644 (file)
@@ -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: