]> git.mxchange.org Git - friendica.git/commitdiff
Check for post existence
authorMichael <heluecht@pirati.ca>
Fri, 14 Oct 2022 22:02:25 +0000 (22:02 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 14 Oct 2022 22:02:25 +0000 (22:02 +0000)
src/Model/Item.php

index 797def3bd877e804abd3b777ce8f00e14cff6cfb..ceb8fcc88fd4f6ad5da7986eb894980b94079a19 100644 (file)
@@ -1119,7 +1119,9 @@ class Item
                $item['raw-body'] = Post\Media::insertFromBody($item['uri-id'], $item['raw-body']);
                $item['raw-body'] = self::setHashtags($item['raw-body']);
 
-               if ($quote_id = self::getQuoteUriId($item['body'])) {
+               $quote_id = self::getQuoteUriId($item['body']);
+
+               if (!empty($quote_id) && Post::exists(['uri-id' => $quote_id, 'network' => Protocol::FEDERATED])) {
                        $item['quote-uri-id'] = $quote_id;
                        $item['raw-body'] = BBCode::replaceSharedData($item['raw-body']);
                }