From 71401659b812b8768fe70aa27221e3319ee1c434 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 25 Nov 2016 13:13:16 +0100 Subject: Fix #65 - Options to block notifications from people you don't follow/who don't follow you --- app/services/notify_service.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/services/notify_service.rb') 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 -- cgit