about summary refs log tree commit diff
path: root/app/services/activitypub/fetch_featured_collection_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2021-01-26 23:21:32 +0100
committerGitHub <noreply@github.com>2021-01-26 23:21:32 +0100
commit52ff3ca675ecac0ff32990b6321fb5e349e6dc59 (patch)
treeeeeeeead25872b19b34b31e3ccbd543d3e2fd9b8 /app/services/activitypub/fetch_featured_collection_service.rb
parentca6c62068e35537251cc650c8b2d03a1a2163d06 (diff)
parent00e55445b9aa5a399a9f8b76e42fde9da2c399fd (diff)
Merge pull request #1491 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services/activitypub/fetch_featured_collection_service.rb')
-rw-r--r--app/services/activitypub/fetch_featured_collection_service.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/services/activitypub/fetch_featured_collection_service.rb b/app/services/activitypub/fetch_featured_collection_service.rb
index 82c861f5b..72352aca6 100644
--- a/app/services/activitypub/fetch_featured_collection_service.rb
+++ b/app/services/activitypub/fetch_featured_collection_service.rb
@@ -23,11 +23,8 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
 
   def process_items(items)
     status_ids = items.map { |item| value_or_id(item) }
-                      .reject { |uri| ActivityPub::TagManager.instance.local_uri?(uri) }
-                      .filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri) }
-                      .select { |status| status.account_id == @account.id }
-                      .map(&:id)
-
+                      .filter_map { |uri| ActivityPub::FetchRemoteStatusService.new.call(uri) unless ActivityPub::TagManager.instance.local_uri?(uri) }
+                      .filter_map { |status| status.id if status.account_id == @account.id }
     to_remove = []
     to_add    = status_ids