From a40dee9799658b24f0478f991c629eca84b0237d Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 18 Aug 2020 09:43:05 -0500 Subject: [Bug] Only check URI if string --- app/services/activitypub/fetch_collection_items_service.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/services/activitypub/fetch_collection_items_service.rb b/app/services/activitypub/fetch_collection_items_service.rb index 5b93ea221..9d5fddcfd 100644 --- a/app/services/activitypub/fetch_collection_items_service.rb +++ b/app/services/activitypub/fetch_collection_items_service.rb @@ -3,11 +3,12 @@ class ActivityPub::FetchCollectionItemsService < BaseService include JsonLdHelper - def call(collection_or_uri, account, page_limit: 10, item_limit: 100, allow_synchronous_requests: true) + def call(collection_or_uri, account, page_limit: 10, item_limit: 100, **options) @account = account - @allow_synchronous_requests = allow_synchronous_requests + @allow_synchronous_requests = options[:allow_synchronous_requests] + @sync = options[:sync] - return [] if ActivityPub::TagManager.instance.local_uri?(collection_or_uri) + return [] if collection_or_uri.is_a?(String) && ActivityPub::TagManager.instance.local_uri?(collection_or_uri) collection_items(collection_or_uri, page_limit, item_limit) end -- cgit