about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-07 01:50:37 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-07 01:50:37 +0100
commit34f261e6af9a5b7df3c71414e690dfb72414065b (patch)
tree9f8d3ce4946e2dc29c5cb2a685ae9d9ff2b9b646
parentdfb45374d220287012ffaae68ceee7159993bbac (diff)
Avoid unnecessarily fetching the replies collection when it is empty (#10201)
-rw-r--r--app/lib/activitypub/activity/create.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index 07ef16bf3..87179030c 100644
--- a/app/lib/activitypub/activity/create.rb
+++ b/app/lib/activitypub/activity/create.rb
@@ -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