Skip to content
Snippets Groups Projects
Unverified Commit 2a704add authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix status processing failing halfway when a remote post has a malformed...

Fix status processing failing halfway when a remote post has a malformed `replies` attribute (#31246)
parent 6a27a8c3
No related branches found
No related tags found
No related merge requests found
......@@ -336,13 +336,15 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
def fetch_replies(status)
collection = @object['replies']
return if collection.nil?
return if collection.blank?
replies = ActivityPub::FetchRepliesService.new.call(status, collection, allow_synchronous_requests: false, request_id: @options[:request_id])
return unless replies.nil?
uri = value_or_id(collection)
ActivityPub::FetchRepliesWorker.perform_async(status.id, uri, { 'request_id' => @options[:request_id] }) unless uri.nil?
rescue => e
Rails.logger.warn "Error fetching replies: #{e}"
end
def conversation_from_uri(uri)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment