]> git.mxchange.org Git - friendica.git/commitdiff
Issue 10506: Fix for multiple picture posts
authorMichael <heluecht@pirati.ca>
Sat, 17 Jul 2021 04:32:46 +0000 (04:32 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 17 Jul 2021 04:32:46 +0000 (04:32 +0000)
src/Model/Post/Media.php

index 90f42a45934fb9fecb458251159a4aae02f6ea81..c0f09b8b90caeada8fece8212a7c4e4a6ee6e3ee 100644 (file)
@@ -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);
                        }
                }