diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-18 09:43:05 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:19 -0500 |
commit | a40dee9799658b24f0478f991c629eca84b0237d (patch) | |
tree | ee46248321efc6977331f9ac46cd72c7a4dde859 /app/services/activitypub | |
parent | 797b8e0e6f7e154f14669e5e50ab1291fb66ed57 (diff) |
[Bug] Only check URI if string
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 |