]> cat aescling's git repositories - mastodon.git/commitdiff
Skip blocked domains media on tootctl media refresh (#16914)
authorJeong Arm <kjwonmail@gmail.com>
Thu, 28 Oct 2021 17:30:44 +0000 (02:30 +0900)
committerGitHub <noreply@github.com>
Thu, 28 Oct 2021 17:30:44 +0000 (19:30 +0200)
lib/mastodon/media_cli.rb

index 59c118500ac513ea3d6cceaacca8dc4887b29a0c..36ca71844f0dcd73903e6005e00c06df38346c59 100644 (file)
@@ -230,6 +230,7 @@ module Mastodon
 
       processed, aggregate = parallelize_with_progress(scope) do |media_attachment|
         next if media_attachment.remote_url.blank? || (!options[:force] && media_attachment.file_file_name.present?)
+        next if DomainBlock.reject_media?(media_attachment.account.domain)
 
         unless options[:dry_run]
           media_attachment.reset_file!