]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Notifier.php
all endpoints are now working
[friendica.git] / src / Worker / Notifier.php
index 693a9e343d55f7ff5a34f9fbe4e0b8c158614ebd..b457b7800851177c4254f505e4ef515c5c290992 100644 (file)
@@ -414,12 +414,22 @@ class Notifier
                        }
                }
 
-               $inboxes = ActivityPub::fetchTargetInboxes($target_item);
+               $inboxes = [];
+
+               if ($target_item['origin']) {
+                       $inboxes = ActivityPub::fetchTargetInboxes($target_item, $uid);
+               }
+
+               if ($parent['origin']) {
+                       $parent_inboxes = ActivityPub::fetchTargetInboxes($parent, $uid);
+                       $inboxes = array_merge($inboxes, $parent_inboxes);
+               }
+
                foreach ($inboxes as $inbox) {
                        logger('Deliver ' . $item_id .' to ' . $inbox .' via ActivityPub', LOGGER_DEBUG);
 
                        Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
-                                       'APDelivery', $cmd, $item_id, $inbox);
+                                       'APDelivery', $cmd, $item_id, $inbox, $uid);
                }
 
                // send salmon slaps to mentioned remote tags (@foo@example.com) in OStatus posts