about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-21 05:59:48 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-21 05:59:48 -0600
commit8bd0e6d52677dedad64d4f7c1be064988561d4ae (patch)
tree465db9be3012b2474a7dfcb3d559e7e28fe7ce22 /app/workers
parentd156482b7919658817aeff261dfff160c8b25fa1 (diff)
teach `FetchMediaWorker` the new upstream way of checking for blocked accounts
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/fetch_media_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/fetch_media_worker.rb b/app/workers/fetch_media_worker.rb
index 3e5eafb66..416fbb0e2 100644
--- a/app/workers/fetch_media_worker.rb
+++ b/app/workers/fetch_media_worker.rb
@@ -7,8 +7,10 @@ class FetchMediaWorker
 
   def perform(media_attachment_id, remote_url: nil, force: false)
     object = MediaAttachment.find(media_attachment_id.to_i)
-    return if object.blocked?
+
+    return if object&.account.nil? || DomainBlock.reject_media?(object.account.domain)
     return unless force || object.needs_redownload?
+
     if remote_url.nil?
       return if object.remote_url.nil?
     else