"parent = id" is replaced with gravity check

This commit is contained in:
Michael 2020-05-28 16:02:36 +00:00
parent bdfe47dcfd
commit 0acb5d4558
6 changed files with 12 additions and 9 deletions

View file

@ -2020,7 +2020,7 @@ class OStatus
{
$mentioned = [];
if (($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) {
if ($item['gravity'] != GRAVITY_PARENT) {
$parent = Item::selectFirst(['guid', 'author-link', 'owner-link'], ['id' => $item['parent']]);
$parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);