0
0
Fork 0

Fix #65 - Options to block notifications from people you don't follow/who don't follow you

This commit is contained in:
Eugen Rochko 2016-11-25 13:13:16 +01:00
parent e3ed212b85
commit 71401659b8
8 changed files with 20 additions and 7 deletions

View file

@ -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