about summary refs log tree commit diff
path: root/app/services/after_block_domain_from_account_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/after_block_domain_from_account_service.rb')
-rw-r--r--app/services/after_block_domain_from_account_service.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/after_block_domain_from_account_service.rb b/app/services/after_block_domain_from_account_service.rb
index 89d007c1c..58bd69bdd 100644
--- a/app/services/after_block_domain_from_account_service.rb
+++ b/app/services/after_block_domain_from_account_service.rb
@@ -11,6 +11,7 @@ class AfterBlockDomainFromAccountService < BaseService
     @domain  = domain
 
     clear_notifications!
+    defederate_from_domain!
     remove_follows!
     reject_existing_followers!
     reject_pending_follow_requests!
@@ -18,6 +19,10 @@ class AfterBlockDomainFromAccountService < BaseService
 
   private
 
+  def defederate_from_domain!
+    DefederateAccountService.new.call(@account, @domain)
+  end
+
   def remove_follows!
     @account.active_relationships.where(target_account: Account.where(domain: @domain)).includes(:target_account).reorder(nil).find_each do |follow|
       UnfollowService.new.call(@account, follow.target_account)