From feab53b58bd51f105c4c97a53914d7ad182c5e3c Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 17 Jul 2021 04:32:46 +0000 Subject: [PATCH] Issue 10506: Fix for multiple picture posts --- src/Model/Post/Media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index 90f42a4593..c0f09b8b90 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -224,7 +224,7 @@ class Media /** * Fetch media data from local resources - * @param array $media + * @param array $media * @return array media with added data */ private static function fetchLocalData(array $media) @@ -388,7 +388,7 @@ class Media foreach ($attachments as $attachment) { // Only store attachments that are part of the unshared body - if (Item::containsLink($unshared_body, $attachment['url'], $attachment['type'])) { + if (Item::containsLink($unshared_body, $attachment['preview'] ?? $attachment['url'], $attachment['type'])) { self::insert($attachment); } }