]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Receiver.php
Merge branch 'post-reason' of github.com:annando/friendica into post-reason
[friendica.git] / src / Protocol / ActivityPub / Receiver.php
index f09541b13d715dc60e350cc614416b983f32efd0..2231d0acbd3f8e673746f0097111b9a53c2eb45a 100644 (file)
@@ -592,7 +592,7 @@ class Receiver
                        return;
                }
 
-               if (!empty($object_data['entry-id']) && ($push || ($activity['completion-mode'] == self::COMPLETION_RELAY))) {
+               if (!empty($object_data['entry-id']) && DI::config()->get('system', 'decoupled_receiver') && ($push || ($activity['completion-mode'] == self::COMPLETION_RELAY))) {
                        // We delay by 5 seconds to allow to accumulate all receivers
                        $delayed = date(DateTimeFormat::MYSQL, time() + 5);
                        Logger::debug('Initiate processing', ['id' => $object_data['entry-id'], 'uri' => $object_data['object_id']]);
@@ -986,7 +986,7 @@ class Receiver
                }
 
                if (!empty($reply)) {
-                       $parents = Post::select(['uid'], ['uri' => $reply]);
+                       $parents = Post::select(['uid'], DBA::mergeConditions(['uri' => $reply], ["`uid` != ?", 0]));
                        while ($parent = Post::fetch($parents)) {
                                $receivers[$parent['uid']] = ['uid' => $parent['uid'], 'type' => self::TARGET_ANSWER];
                        }