mirror of
https://github.com/friendica/friendica
synced 2025-04-30 05:04:22 +02:00
AP: Transmitting and receiving with non AP contacts
This commit is contained in:
parent
97c181a391
commit
fea48fa85e
5 changed files with 68 additions and 46 deletions
|
@ -512,6 +512,7 @@ class Notifier
|
|||
private static function activityPubDelivery($a, $cmd, $item_id, $uid, $target_item, $parent)
|
||||
{
|
||||
$inboxes = [];
|
||||
$personal = false;
|
||||
|
||||
if ($target_item['origin']) {
|
||||
$inboxes = ActivityPub\Transmitter::fetchTargetInboxes($target_item, $uid);
|
||||
|
@ -520,11 +521,14 @@ class Notifier
|
|||
logger('Remote item ' . $item_id . ' with URL ' . $target_item['uri'] . ' is no AP post. It will not be distributed.', LOGGER_DEBUG);
|
||||
return;
|
||||
} else {
|
||||
// Remote items are transmitted via the personal inboxes.
|
||||
// Doing so ensures that the dedicated receiver will get the message.
|
||||
$personal = true;
|
||||
logger('Remote item ' . $item_id . ' with URL ' . $target_item['uri'] . ' will be distributed.', LOGGER_DEBUG);
|
||||
}
|
||||
|
||||
if ($parent['origin']) {
|
||||
$parent_inboxes = ActivityPub\Transmitter::fetchTargetInboxes($parent, $uid);
|
||||
$parent_inboxes = ActivityPub\Transmitter::fetchTargetInboxes($parent, $uid, $personal);
|
||||
$inboxes = array_merge($inboxes, $parent_inboxes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue