about summary refs log tree commit diff
path: root/app/services/process_interaction_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-03 18:49:52 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-03 18:49:52 +0200
commit70e9dd0b5b2c4b2d695334d8b63c6d58cb1619d8 (patch)
treed1ff421300703d4b690e111dd8b5b5da665aab5b /app/services/process_interaction_service.rb
parent7b9a4af3112dc4edcd378dc94190e2eb8e041f56 (diff)
Blocking will prevent e-mail notifications from blocked user, blocks in UI
Diffstat (limited to 'app/services/process_interaction_service.rb')
-rw-r--r--app/services/process_interaction_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb
index 96dae30da..31c7c46a5 100644
--- a/app/services/process_interaction_service.rb
+++ b/app/services/process_interaction_service.rb
@@ -58,7 +58,7 @@ class ProcessInteractionService < BaseService
 
   def follow!(account, target_account)
     account.follow!(target_account)
-    NotificationMailer.follow(target_account, account).deliver_later
+    NotificationMailer.follow(target_account, account).deliver_later unless target_account.blocking?(account)
   end
 
   def unfollow!(account, target_account)
@@ -78,7 +78,7 @@ class ProcessInteractionService < BaseService
   def favourite!(xml, from_account)
     current_status = status(xml)
     current_status.favourites.where(account: from_account).first_or_create!(account: from_account)
-    NotificationMailer.favourite(current_status, from_account).deliver_later
+    NotificationMailer.favourite(current_status, from_account).deliver_later unless current_status.account.blocking?(from_account)
   end
 
   def add_post!(body, account)