From 7c3173a0ae999c3ddc99a9c6d2441650cf47c52e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 May 2022 06:07:26 +0000 Subject: [PATCH] Avoid endless loop when storing posts --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 496757910a..492442188a 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1442,7 +1442,7 @@ class Item return 0; } - if ((($item['gravity'] == GRAVITY_COMMENT) || $is_reshare) && !Post::exists(['uri-id' => $item['thr-parent-id'], 'uid' => $uid])) { + if (($uri_id != $item['thr-parent-id']) && (($item['gravity'] == GRAVITY_COMMENT) || $is_reshare) && !Post::exists(['uri-id' => $item['thr-parent-id'], 'uid' => $uid])) { // Fetch the origin user for the post $origin_uid = self::GetOriginUidForUriId($item['thr-parent-id'], $uid); if (is_null($origin_uid)) { -- 2.39.5