mirror of
https://github.com/friendica/friendica
synced 2025-04-28 11:44:23 +02:00
Don't always fetch parent posts
This commit is contained in:
parent
23ef4a99bb
commit
3463e34693
3 changed files with 19 additions and 14 deletions
|
@ -175,10 +175,11 @@ class Queue
|
|||
* Process the activity with the given id
|
||||
*
|
||||
* @param integer $id
|
||||
* @param bool $fetch_parents
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function process(int $id): bool
|
||||
public static function process(int $id, bool $fetch_parents = true): bool
|
||||
{
|
||||
$entry = DBA::selectFirst('inbox-entry', [], ['id' => $id]);
|
||||
if (empty($entry)) {
|
||||
|
@ -215,7 +216,7 @@ class Queue
|
|||
}
|
||||
DBA::close($receivers);
|
||||
|
||||
if (!Receiver::routeActivities($activity, $type, $push)) {
|
||||
if (!Receiver::routeActivities($activity, $type, $push, $fetch_parents)) {
|
||||
self::remove($activity);
|
||||
}
|
||||
|
||||
|
@ -236,7 +237,7 @@ class Queue
|
|||
continue;
|
||||
}
|
||||
Logger::debug('Process leftover entry', $entry);
|
||||
self::process($entry['id']);
|
||||
self::process($entry['id'], false);
|
||||
}
|
||||
DBA::close($entries);
|
||||
}
|
||||
|
@ -272,7 +273,7 @@ class Queue
|
|||
$entries = DBA::select('inbox-entry', ['id'], ["`in-reply-to-id` = ? AND `object-id` != ?", $uri, $uri]);
|
||||
while ($entry = DBA::fetch($entries)) {
|
||||
$count += 1;
|
||||
self::process($entry['id']);
|
||||
self::process($entry['id'], false);
|
||||
}
|
||||
DBA::close($entries);
|
||||
return $count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue