From 2e6ab0e31293a8e154561001924ce8d888b32c88 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 17 Dec 2022 05:48:09 +0000 Subject: [PATCH] Fix: Images must not be removed on preview --- src/Model/Item.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 61aeb251e..33ba8ee7a 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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'];