diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-21 05:59:48 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 05:59:48 -0600 |
commit | 8bd0e6d52677dedad64d4f7c1be064988561d4ae (patch) | |
tree | 465db9be3012b2474a7dfcb3d559e7e28fe7ce22 /app/workers | |
parent | d156482b7919658817aeff261dfff160c8b25fa1 (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.rb | 4 |
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 |