*/
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]);
$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'];
$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;
}
$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;
}
$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;
}
$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;
}
$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);
$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');
}
}
- $object_data['receiver'] = self::getReceivers($object, $object_data['owner']);
+ $object_data['receiver'] = self::getReceivers($object, $object_data['actor']);
// Common object data: