Merge pull request #10304 from annando/fix-emptymissing-photos

Fix missing media on posts to Mastodon
This commit is contained in:
Tobias Diekershoff
2021-05-23 15:34:34 +02:00
committed by GitHub

View 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);
}
}