diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/block_domain_service.rb | 2 | ||||
-rw-r--r-- | app/services/unblock_domain_service.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb index d15a1e83c..3f8f5b385 100644 --- a/app/services/block_domain_service.rb +++ b/app/services/block_domain_service.rb @@ -19,7 +19,7 @@ class BlockDomainService < BaseService end def silence_accounts! - blocked_domain_accounts.update_all(silenced: true) + blocked_domain_accounts.in_batches.update_all(silenced: true) clear_media! if domain_block.reject_media? end diff --git a/app/services/unblock_domain_service.rb b/app/services/unblock_domain_service.rb index 9794e439d..77460f76b 100644 --- a/app/services/unblock_domain_service.rb +++ b/app/services/unblock_domain_service.rb @@ -3,10 +3,12 @@ class UnblockDomainService < BaseService def call(domain_block, retroactive) if retroactive + accounts = Account.where(domain: domain_block.domain).in_batches + if domain_block.silence? - Account.where(domain: domain_block.domain).update_all(silenced: false) + accounts.update_all(silenced: false) else - Account.where(domain: domain_block.domain).update_all(suspended: false) + accounts.update_all(suspended: false) end end |