about summary refs log tree commit diff
path: root/app/services/activitypub/fetch_featured_collection_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-09 03:27:35 +0200
committerGitHub <noreply@github.com>2019-07-09 03:27:35 +0200
commit4e921832272425352d28cad550bfc4dffd6d0e78 (patch)
treec315a0b9dda8b69b6512c79711e896a18756f701 /app/services/activitypub/fetch_featured_collection_service.rb
parent1e7187f2a8e0b9ffe4e7d6b06e9f70674c50471e (diff)
Refactor domain block checks (#11268)
Diffstat (limited to 'app/services/activitypub/fetch_featured_collection_service.rb')
-rw-r--r--app/services/activitypub/fetch_featured_collection_service.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/activitypub/fetch_featured_collection_service.rb b/app/services/activitypub/fetch_featured_collection_service.rb
index 6a137b520..2c2770466 100644
--- a/app/services/activitypub/fetch_featured_collection_service.rb
+++ b/app/services/activitypub/fetch_featured_collection_service.rb
@@ -4,13 +4,12 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
   include JsonLdHelper
 
   def call(account)
-    return if account.featured_collection_url.blank?
+    return if account.featured_collection_url.blank? || account.suspended? || account.local?
 
     @account = account
     @json    = fetch_resource(@account.featured_collection_url, true)
 
     return unless supported_context?
-    return if @account.suspended? || @account.local?
 
     case @json['type']
     when 'Collection', 'CollectionPage'