Avoid unnecessarily fetching the replies collection when it is empty (#10201)
parent
401a3cfdf0
commit
db21a6c5ee
app/lib/activitypub/activity
|
@ -253,7 +253,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
collection = @object['replies']
|
collection = @object['replies']
|
||||||
return if collection.nil?
|
return if collection.nil?
|
||||||
replies = ActivityPub::FetchRepliesService.new.call(status, collection, false)
|
replies = ActivityPub::FetchRepliesService.new.call(status, collection, false)
|
||||||
return if replies.present?
|
return unless replies.nil?
|
||||||
uri = value_or_id(collection)
|
uri = value_or_id(collection)
|
||||||
ActivityPub::FetchRepliesWorker.perform_async(status.id, uri) unless uri.nil?
|
ActivityPub::FetchRepliesWorker.perform_async(status.id, uri) unless uri.nil?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue