]> git.mxchange.org Git - friendica.git/commitdiff
Fix: Images must not be removed on preview
authorMichael <heluecht@pirati.ca>
Sat, 17 Dec 2022 05:48:09 +0000 (05:48 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 17 Dec 2022 05:48:09 +0000 (05:48 +0000)
src/Model/Item.php

index 61aeb251ea7e1d9f2f361af38eac4626fad0dec8..33ba8ee7a4d1b849631bec1e245d17c4f91f8fc9 100644 (file)
@@ -3016,7 +3016,11 @@ class Item
                $item['hashtags'] = $tags['hashtags'];
                $item['mentions'] = $tags['mentions'];
 
-               $body = $item['body'] = Post\Media::removeFromEndOfBody($item['body'] ?? '');
+               if (!$is_preview) {
+                       $item['body'] = Post\Media::removeFromEndOfBody($item['body'] ?? '');
+               }
+
+               $body = $item['body'];
 
                $fields = ['uri-id', 'uri', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'network', 'has-media', 'quote-uri-id', 'post-type'];