Commit 34f261e6 authored by ThibG's avatar ThibG Committed by Eugen Rochko

Avoid unnecessarily fetching the replies collection when it is empty (#10201)

parent dfb45374
......@@ -253,7 +253,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
collection = @object['replies']
return if collection.nil?
replies = ActivityPub::FetchRepliesService.new.call(status, collection, false)
return if replies.present?
return unless replies.nil?
uri = value_or_id(collection)
ActivityPub::FetchRepliesWorker.perform_async(status.id, uri) unless uri.nil?
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment