}
// Skip the delivery to Diaspora if the item is from an ActivityPub author
- if ($item['author-network'] == Protocol::ACTIVITYPUB) {
+ if (!empty($item['author-network']) && ($item['author-network'] == Protocol::ACTIVITYPUB)) {
return true;
}
// Skip the delivery to Diaspora if the thread parent is from an ActivityPub author
- if ($thr_parent['author-network'] == Protocol::ACTIVITYPUB) {
+ if (!empty($thr_parent['author-network']) && ($thr_parent['author-network'] == Protocol::ACTIVITYPUB)) {
return true;
}
$inboxes = ActivityPub\Transmitter::fetchTargetInboxes($target_item, $uid);
if (in_array($target_item['private'], [Item::PUBLIC])) {
- $relay_inboxes = ActivityPub\Transmitter::addRelayServerInboxes([]);
+ $relay_inboxes = ActivityPub\Transmitter::addRelayServerInboxes();
}
Logger::log('Origin item ' . $target_item['id'] . ' with URL ' . $target_item['uri'] . ' will be distributed.', Logger::DEBUG);