From f7a96189b68da6ef87aa9560da04c9b49da8b83a Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 29 Mar 2018 00:52:24 +0200 Subject: [PATCH] Do not ignore unknown media attachments, only skip them (#6948) That way, they are displayed in a list below the corresponding toot. --- app/lib/activitypub/activity/create.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 676e885c0b..afee8a268a 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -113,13 +113,13 @@ class ActivityPub::Activity::Create < ActivityPub::Activity media_attachments = [] as_array(@object['attachment']).each do |attachment| - next if unsupported_media_type?(attachment['mediaType']) || attachment['url'].blank? + next if attachment['url'].blank? href = Addressable::URI.parse(attachment['url']).normalize.to_s media_attachment = MediaAttachment.create(account: @account, remote_url: href, description: attachment['name'].presence, focus: attachment['focalPoint']) media_attachments << media_attachment - next if skip_download? + next if unsupported_media_type?(attachment['mediaType']) || skip_download? media_attachment.file_remote_url = href media_attachment.save