mirror of
https://github.com/friendica/friendica
synced 2025-04-25 05:50:12 +00:00
Fix media handling upon creation and display
This commit is contained in:
parent
46e251be1f
commit
3d65809a82
2 changed files with 27 additions and 3 deletions
|
@ -2990,8 +2990,9 @@ class Item
|
|||
private static function addLinkAttachment(int $uriid, array $attachments, string $body, string $content, bool $shared, array $ignore_links)
|
||||
{
|
||||
DI::profiler()->startRecording('rendering');
|
||||
// @ToDo Check only for audio and video
|
||||
$preview = empty($attachments['visual']);
|
||||
// Don't show a preview when there is a visual attachment (audio or video)
|
||||
$types = array_column($attachments['visual'], 'type');
|
||||
$preview = !in_array(Post\Media::IMAGE, $types) && !in_array(Post\Media::VIDEO, $types);
|
||||
|
||||
if (!empty($attachments['link'])) {
|
||||
foreach ($attachments['link'] as $link) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue