diff options
author | ThibG <thib@sitedethib.com> | 2019-03-07 01:50:37 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-03-07 01:50:37 +0100 |
commit | 34f261e6af9a5b7df3c71414e690dfb72414065b (patch) | |
tree | 9f8d3ce4946e2dc29c5cb2a685ae9d9ff2b9b646 /app/lib/activitypub/activity | |
parent | dfb45374d220287012ffaae68ceee7159993bbac (diff) |
Avoid unnecessarily fetching the replies collection when it is empty (#10201)
Diffstat (limited to 'app/lib/activitypub/activity')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 2 |
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 |