mirror of
https://github.com/friendica/friendica
synced 2024-12-23 02:40:17 +00:00
Merge pull request #14269 from annando/reply-loop
Avoid loops when fetching replies
This commit is contained in:
commit
d93b7933d4
2 changed files with 4 additions and 3 deletions
|
@ -515,7 +515,7 @@ class Processor
|
|||
}
|
||||
}
|
||||
|
||||
if (DI::config()->get('system', 'decoupled_receiver')) {
|
||||
if (DI::config()->get('system', 'decoupled_receiver') && ($activity['completion-mode'] ?? Receiver::COMPLETION_NONE != Receiver::COMPLETION_REPLIES)) {
|
||||
$replies = [$item['thr-parent']];
|
||||
if (!empty($item['parent-uri'])) {
|
||||
$replies[] = $item['parent-uri'];
|
||||
|
@ -1780,7 +1780,7 @@ class Processor
|
|||
}
|
||||
if (parse_url($id, PHP_URL_HOST) == parse_url($url, PHP_URL_HOST)) {
|
||||
Logger::debug('Incluced activity will be processed', ['replies' => $url, 'id' => $id]);
|
||||
self::processActivity($reply, $id, $child, '', Receiver::COMPLETION_AUTO);
|
||||
self::processActivity($reply, $id, $child, '', Receiver::COMPLETION_REPLIES);
|
||||
++$fetched;
|
||||
continue;
|
||||
}
|
||||
|
@ -1795,7 +1795,7 @@ class Processor
|
|||
Logger::debug('Activity is already queued', ['replies' => $url, 'id' => $id]);
|
||||
} else {
|
||||
Logger::debug('Missing Activity will be fetched and processed', ['replies' => $url, 'id' => $id]);
|
||||
self::fetchMissingActivity($id, $child, '', Receiver::COMPLETION_AUTO);
|
||||
self::fetchMissingActivity($id, $child, '', Receiver::COMPLETION_REPLIES);
|
||||
++$fetched;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ class Receiver
|
|||
const COMPLETION_MANUAL = 3;
|
||||
const COMPLETION_AUTO = 4;
|
||||
const COMPLETION_ASYNC = 5;
|
||||
const COMPLETION_REPLIES = 6;
|
||||
|
||||
/**
|
||||
* Checks incoming message from the inbox
|
||||
|
|
Loading…
Reference in a new issue