]> git.mxchange.org Git - friendica.git/commitdiff
Direkt delivery is done
authorMichael <heluecht@pirati.ca>
Fri, 21 Sep 2018 05:41:18 +0000 (05:41 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 21 Sep 2018 05:41:18 +0000 (05:41 +0000)
src/Worker/Notifier.php

index 693a9e343d55f7ff5a34f9fbe4e0b8c158614ebd..3e73b5b5ed19bc86a6712244057685516ed1153c 100644 (file)
@@ -414,7 +414,25 @@ class Notifier
                        }
                }
 
-               $inboxes = ActivityPub::fetchTargetInboxes($target_item);
+               $inboxes = [];
+
+               if ($followup) {
+                       $profile = ActivityPub::fetchprofile($parent['author-link']);
+                       if (!empty($profile)) {
+                               $target = defaults($profile, 'sharedinbox', $profile['inbox']);
+                               $inboxes[$target] = $target;
+                       }
+               } else {
+                       if ($target_item['origin']) {
+                               $inboxes = ActivityPub::fetchTargetInboxes($target_item);
+                       }
+
+                       if ($parent['origin']) {
+                               $parent_inboxes = ActivityPub::fetchTargetInboxes($parent);
+                               $inboxes = array_merge($inboxes, $parent_inboxes);
+                       }
+               }
+
                foreach ($inboxes as $inbox) {
                        logger('Deliver ' . $item_id .' to ' . $inbox .' via ActivityPub', LOGGER_DEBUG);