]> git.mxchange.org Git - friendica.git/commitdiff
Reset the recursion depth at a different place
authorMichael <heluecht@pirati.ca>
Thu, 21 Jul 2022 06:26:31 +0000 (06:26 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 21 Jul 2022 06:26:31 +0000 (06:26 +0000)
src/Protocol/ActivityPub/Processor.php

index fe7a4c5967aa1252270319364475e79d21c63d37..7973f0c0aadb85e571b3240dc7bbe42c8aceb886 100644 (file)
@@ -288,12 +288,12 @@ class Processor
                                $fetch_by_worker = empty($result);
                        } else {
                                Logger::notice('Recursion level is too high.', ['parent' => $activity['reply-to-id'], 'recursion-depth' => $recursion_depth]);
-                               $activity['recursion-depth'] = 0;
                                $fetch_by_worker = true;
                        }
 
                        if ($fetch_by_worker) {
                                Logger::notice('Fetching is done by worker.', ['parent' => $activity['reply-to-id'], 'recursion-depth' => $recursion_depth]);
+                               $activity['recursion-depth'] = 0;
                                Worker::add(PRIORITY_HIGH, 'FetchMissingActivity', $activity['reply-to-id'], $activity, '', Receiver::COMPLETION_AUTO);
                                return [];
                        }