New table "post-counts" to precalculate the counts

This commit is contained in:
Michael 2023-12-28 17:42:39 +00:00
parent 2588ac1a16
commit 40a1263066
9 changed files with 222 additions and 4 deletions

View file

@ -1272,6 +1272,11 @@ class Receiver
}
}
if (empty($receivers) && !empty($parent['parent-author-link'])) {
$uid = User::getIdForURL($parent['parent-author-link']);
$receivers[$uid] = ['uid' => $uid, 'type' => self::TARGET_BTO];
}
if (!empty($reply) && (!empty($receivers[0]) || !empty($receivers[-1]))) {
$parents = Post::select(['uid'], DBA::mergeConditions(['uri' => $reply], ["`uid` != ?", 0]));
while ($parent = Post::fetch($parents)) {