1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-24 07:06:18 +09:00

Skip blocked domains media on tootctl media refresh (#16914)

This commit is contained in:
Jeong Arm 2021-10-29 02:30:44 +09:00 committed by GitHub
parent 7ccbfb55dd
commit 884c60002e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,6 +230,7 @@ module Mastodon
processed, aggregate = parallelize_with_progress(scope) do |media_attachment| 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 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] unless options[:dry_run]
media_attachment.reset_file! media_attachment.reset_file!