diff options
Diffstat (limited to 'app/services/activitypub')
-rw-r--r-- | app/services/activitypub/fetch_collection_items_service.rb | 7 |
1 files 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 |