Merge pull request #10507 from annando/issue-10506

Issue 10506: Fix for multiple picture posts
This commit is contained in:
Tobias Diekershoff 2021-07-17 06:47:30 +02:00 committed by GitHub
commit 6331e1e71c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -388,7 +388,7 @@ class Media
foreach ($attachments as $attachment) { foreach ($attachments as $attachment) {
// Only store attachments that are part of the unshared body // 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); self::insert($attachment);
} }
} }