]> git.mxchange.org Git - friendica.git/commitdiff
Improved processing of leftover queued posts
authorMichael <heluecht@pirati.ca>
Thu, 26 Oct 2023 05:01:54 +0000 (05:01 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 26 Oct 2023 05:01:54 +0000 (05:01 +0000)
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Queue.php

index a0ce61d9c1f54a76dea77ea60535994b8a54594e..21a2c4143e2c90ef1eb6c9fcda51c532942e75ef 100644 (file)
@@ -752,6 +752,7 @@ class Processor
        {
                $post = self::getUriIdForFeaturedCollection($activity);
                if (empty($post)) {
+                       Queue::remove($activity);
                        return;
                }
 
index 3a234e945ad753188067c1f363cc10e146cb9713..4aae76a4b0aa62b65c35fe5e3c3bcb47276f1759 100644 (file)
@@ -252,12 +252,7 @@ class Queue
        {
                $entries = DBA::select('inbox-entry', ['id', 'type', 'object-type', 'object-id', 'in-reply-to-id'], ["`trust` AND `wid` IS NULL"], ['order' => ['id' => true]]);
                while ($entry = DBA::fetch($entries)) {
-                       // Don't process entries of items that are answer to nonexistent posts
-                       if (!empty($entry['in-reply-to-id']) && !Post::exists(['uri' => $entry['in-reply-to-id']])) {
-                               continue;
-                       }
-                       // We don't need to process entries that depend on already existing entries.
-                       if (!empty($entry['in-reply-to-id']) && DBA::exists('inbox-entry', ["`id` != ? AND `object-id` = ?", $entry['id'], $entry['in-reply-to-id']])) {
+                       if (!self::isProcessable($entry['id'])) {
                                continue;
                        }
                        Logger::debug('Process leftover entry', $entry);