|
|
|
@ -110,7 +110,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|
|
|
|
def process_status_params
|
|
|
|
|
@status_parser = ActivityPub::Parser::StatusParser.new(@json, followers_collection: @account.followers_url, object: @object)
|
|
|
|
|
|
|
|
|
|
attachment_ids = process_attachments.take(4).map(&:id)
|
|
|
|
|
attachment_ids = process_attachments.take(Status::MEDIA_ATTACHMENTS_LIMIT).map(&:id)
|
|
|
|
|
|
|
|
|
|
@params = {
|
|
|
|
|
uri: @status_parser.uri,
|
|
|
|
@ -260,7 +260,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|
|
|
|
as_array(@object['attachment']).each do |attachment|
|
|
|
|
|
media_attachment_parser = ActivityPub::Parser::MediaAttachmentParser.new(attachment)
|
|
|
|
|
|
|
|
|
|
next if media_attachment_parser.remote_url.blank? || media_attachments.size >= 4
|
|
|
|
|
next if media_attachment_parser.remote_url.blank? || media_attachments.size >= Status::MEDIA_ATTACHMENTS_LIMIT
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
media_attachment = MediaAttachment.create(
|
|
|
|
|