owner is now actor
This commit is contained in:
parent
616c4a89bd
commit
1efca1b75d
2 changed files with 15 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in a new issue