]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub/Queue.php
Merge branch 'post-reason' of github.com:annando/friendica into post-reason
[friendica.git] / src / Protocol / ActivityPub / Queue.php
index b389626a3ec0a5bcc365b32c70eb05505d9959da..95a4cfa0d4557ecd5a34e33ef8ae5d413ac751dc 100644 (file)
@@ -126,11 +126,6 @@ class Queue
                        return;
                }
 
-               $children = DBA::select('inbox-entry', ['id'], ['in-reply-to-id' => $entry['object-id']]);
-               while ($child = DBA::fetch($children)) {
-                       self::deleteById($child['id']);
-               }
-               DBA::close($children);
                DBA::delete('inbox-entry', ['id' => $entry['id']]);
        }
 
@@ -167,13 +162,14 @@ class Queue
         * Process the activity with the given id
         *
         * @param integer $id
-        * @return void
+        *
+        * @return bool
         */
-       public static function process(int $id)
+       public static function process(int $id): bool
        {
                $entry = DBA::selectFirst('inbox-entry', [], ['id' => $id]);
                if (empty($entry)) {
-                       return;
+                       return false;
                }
 
                Logger::debug('Processing queue entry', ['id' => $entry['id'], 'type' => $entry['type'], 'object-type' => $entry['object-type'], 'uri' => $entry['object-id'], 'in-reply-to' => $entry['in-reply-to-id']]);
@@ -197,6 +193,8 @@ class Queue
                if (!Receiver::routeActivities($activity, $type, $push)) {
                        self::remove($activity);
                }
+
+               return true;
        }
 
        /**