From 34f261e6af9a5b7df3c71414e690dfb72414065b Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 7 Mar 2019 01:50:37 +0100 Subject: Avoid unnecessarily fetching the replies collection when it is empty (#10201) --- app/lib/activitypub/activity/create.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/lib/activitypub/activity') 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 -- cgit