diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-22 00:13:10 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 01:48:49 -0600 |
commit | 0a238f34b39b606d5f20e1ef1fbdd2a8c56951db (patch) | |
tree | 9192e83c420e085c16c8a65fe6077ca30046dd44 /app/services/block_domain_service.rb | |
parent | e6e69f091e3414b29271040926cc1d2e7c5f0e41 (diff) |
port tootsuite#11138 to monsterfork: Change domain blocks to automatically support subdomains
* Change domain blocks to automatically support subdomains If a more authoritative domain is blocked (example.com), then the same block will be applied to a subdomain (foo.example.com) * Match subdomains of existing accounts when blocking/unblocking domains * Improve code style
Diffstat (limited to 'app/services/block_domain_service.rb')
-rw-r--r-- | app/services/block_domain_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb index 36634fdd5..8ec77ce82 100644 --- a/app/services/block_domain_service.rb +++ b/app/services/block_domain_service.rb @@ -123,7 +123,7 @@ class BlockDomainService < BaseService end def blocked_domain_accounts - Account.where(domain: blocked_domain).reorder(nil) + Account.by_domain_and_subdomains(blocked_domain) end def media_from_blocked_domain @@ -131,7 +131,7 @@ class BlockDomainService < BaseService end def emojis_from_blocked_domains - CustomEmoji.where(domain: blocked_domain) + CustomEmoji.by_domain_and_subdomains(blocked_domain) end def unknown_accounts |