about summary refs log tree commit diff
path: root/app/services/block_domain_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-08-21 17:32:41 +0200
committerGitHub <noreply@github.com>2017-08-21 17:32:41 +0200
commit3534e115e5127f12292a84442b46ce93643c6d0d (patch)
treedbfe60842ddc837defb61a087b078cda8c207636 /app/services/block_domain_service.rb
parentea958cae7f6c960bdb54214c12de2083ab0e25b0 (diff)
Do not try to re-subscribe to unsubscribed accounts (#4653)
Diffstat (limited to 'app/services/block_domain_service.rb')
-rw-r--r--app/services/block_domain_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb
index a6b3c4cdb..1473bc841 100644
--- a/app/services/block_domain_service.rb
+++ b/app/services/block_domain_service.rb
@@ -30,7 +30,7 @@ class BlockDomainService < BaseService
 
   def suspend_accounts!
     blocked_domain_accounts.where(suspended: false).find_each do |account|
-      account.subscription(api_subscription_url(account.id)).unsubscribe if account.subscribed?
+      UnsubscribeService.new.call(account) if account.subscribed?
       SuspendAccountService.new.call(account)
     end
   end