Detect the thread parent id if it is missing

This commit is contained in:
Michael 2022-09-29 13:48:10 +00:00
parent ff80a25966
commit 6140f850e1

View file

@ -980,6 +980,13 @@ class Processor
continue;
}
if (($receiver != 0) && empty($item['parent-uri-id']) && !empty($item['thr-parent-id'])) {
$parent = Post::selectFirst(['parent-uri-id'], ['uri-id' => $item['thr-parent-id'], 'uid' => [0, $receiver]]);
if (!empty($parent['parent-uri-id'])) {
$item['parent-uri-id'] = $parent['parent-uri-id'];
}
}
$item['uid'] = $receiver;
$type = $activity['reception_type'][$receiver] ?? Receiver::TARGET_UNKNOWN;