about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-01-02 14:19:02 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-01-02 14:19:02 +0100
commit136e18b875f1743a5aced6f0a07cd949f2f19a5a (patch)
treeb3f7e4f7b53a4e96167abde1f4eb4a7237c8989b
parent65647a24720c1fa1dda832a8ce0f48f48f4cf358 (diff)
Unblocks also federate
-rw-r--r--app/services/unblock_service.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/unblock_service.rb b/app/services/unblock_service.rb
index 3658dcd71..f389364f9 100644
--- a/app/services/unblock_service.rb
+++ b/app/services/unblock_service.rb
@@ -2,6 +2,9 @@
 
 class UnblockService < BaseService
   def call(account, target_account)
-    account.unblock!(target_account) if account.blocking?(target_account)
+    return unless account.blocking?(target_account)
+
+    unblock = account.unblock!(target_account)
+    NotificationWorker.perform_async(unblock.stream_entry.id, target_account.id) unless target_account.local?
   end
 end