]> git.mxchange.org Git - friendica.git/commitdiff
Avoid endless loop when storing posts
authorMichael <heluecht@pirati.ca>
Tue, 10 May 2022 06:07:26 +0000 (06:07 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 10 May 2022 06:07:26 +0000 (06:07 +0000)
src/Model/Item.php

index 496757910ae367a43a006b32513d1606fbdfd06c..492442188a0edef784468d1dda0f04c52d568e0c 100644 (file)
@@ -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)) {