diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-31 01:25:10 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-31 01:25:10 -0500 |
commit | 80a81fe223415525811c0c3ef62b8853624e9a6a (patch) | |
tree | a5438b0d28dd9a872ad0223b2a130dee59ab92b7 /app/services | |
parent | 964054b6dbabf119c9dea9cfa0b71011ace8df07 (diff) |
ability to add domain moderation notes, edit existing domain policies in-place, and process asynchronously
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/block_domain_service.rb | 5 | ||||
-rw-r--r-- | app/services/unblock_domain_service.rb | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb index 4a1218e3f..908deacf4 100644 --- a/app/services/block_domain_service.rb +++ b/app/services/block_domain_service.rb @@ -5,11 +5,16 @@ class BlockDomainService < BaseService def call(domain_block) @domain_block = domain_block + remove_existing_block! process_domain_block! end private + def remove_existing_block! + UnblockDomainService.new.call(@domain_block, false) + end + def process_domain_block! clear_media! if domain_block.reject_media? force_accounts_sensitive! if domain_block.force_sensitive? diff --git a/app/services/unblock_domain_service.rb b/app/services/unblock_domain_service.rb index eceecd6d7..ab246203f 100644 --- a/app/services/unblock_domain_service.rb +++ b/app/services/unblock_domain_service.rb @@ -3,10 +3,10 @@ class UnblockDomainService < BaseService attr_accessor :domain_block - def call(domain_block) + def call(domain_block, destroy_domain_block = true) @domain_block = domain_block process_retroactive_updates - domain_block.destroy + domain_block.destroy if destroy_domain_block end def process_retroactive_updates |