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
commit 0ca929dccd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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