diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-12-08 15:37:12 +0100 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 04:07:31 -0600 |
commit | caeca95f389dc65b0c1719fece7f119f164aa401 (patch) | |
tree | 6c3c0d3a2799aa96a5e99a20f214cb0bc8a5e23f /app | |
parent | 28073bbcd6010de077e528f0447b35e51905ed23 (diff) |
port tootsuite#12568 to monsterfork: Add `tootctl media remove-orphans`
Diffstat (limited to 'app')
-rw-r--r-- | app/models/media_attachment.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 36282d010..d4fd7eeb8 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -183,13 +183,6 @@ class MediaAttachment < ApplicationRecord audio? || video? end - def blocked? - domains = Set[self.account.domain] - domains.add(remote_url.scan(/[\w\-]+\.[\w\-]+(?:\.[\w\-]+)*/).first) if remote_url.present? - blocks = DomainBlock.suspend.or(DomainBlock.where(reject_media: true)) - domains.any? { |domain| blocks.where(domain: domain).or(blocks.where('domain LIKE ?', "%.#{domain}")).exists? } - end - def variant?(other_file_name) return true if file_file_name == other_file_name |