about summary refs log tree commit diff
path: root/app/services/notify_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-25 13:13:16 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-25 13:13:16 +0100
commit71401659b812b8768fe70aa27221e3319ee1c434 (patch)
tree6a1002f53d00866f2f79564bc979d2afe9ac715b /app/services/notify_service.rb
parente3ed212b859a7bec6b26c3d52e6f7ea14069f76d (diff)
Fix #65 - Options to block notifications from people you don't follow/who don't follow you
Diffstat (limited to 'app/services/notify_service.rb')
-rw-r--r--app/services/notify_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb
index 772adfb90..1efd326b0 100644
--- a/app/services/notify_service.rb
+++ b/app/services/notify_service.rb
@@ -36,6 +36,8 @@ class NotifyService < BaseService
     blocked   = false
     blocked ||= @recipient.id == @notification.from_account.id
     blocked ||= @recipient.blocking?(@notification.from_account)
+    blocked ||= (@recipient.user.settings(:interactions).must_be_follower  && !@notification.from_account.following?(@recipient))
+    blocked ||= (@recipient.user.settings(:interactions).must_be_following && !@recipient.following?(@notification.from_account))
     blocked ||= send("blocked_#{@notification.type}?")
     blocked
   end