]> git.mxchange.org Git - friendica.git/commitdiff
Fix missing media on posts to Mastodon
authorMichael <heluecht@pirati.ca>
Sun, 23 May 2021 13:29:25 +0000 (13:29 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 23 May 2021 13:29:25 +0000 (13:29 +0000)
src/Model/Post/Media.php

index c3f745fee64fc9b020f4ba7ce2c8eb5132ead5e9..7834fc47131785add53472244281734f3b958799 100644 (file)
@@ -351,7 +351,7 @@ class Media
 
                foreach ($attachments as $attachment) {
                        // Only store attachments that are part of the unshared body
-                       if (strpos($unshared_body, $attachment['url']) !== false) {
+                       if (Item::containsLink($unshared_body, $attachment['url'], $attachment['type'])) {
                                self::insert($attachment);
                        }
                }