From 9d4f18b984d6699bdf96e5f5963edfe80063426c Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sat, 27 Jun 2020 14:22:30 -0500 Subject: Monsterfork v2 Kaiju Commit 2020.06.27.1 - 2020.09.05.5 --- app/services/notify_service.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/services/notify_service.rb') diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index abd676494..65f6052bf 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -49,6 +49,11 @@ class NotifyService < BaseService @following_sender = @recipient.following?(@notification.from_account) || @recipient.requested?(@notification.from_account) end + def following_recipient? + return @following_recipient if defined?(@following_recipient) + @following_recipient = @notification.from_account.following?(@recipient) + end + def optional_non_follower? @recipient.user.settings.interactions['must_be_follower'] && !@notification.from_account.following?(@recipient) end @@ -81,7 +86,7 @@ class NotifyService < BaseService end def hellbanned? - @notification.from_account.silenced? && !following_sender? + @notification.from_account.silenced? && !(following_sender? || following_recipient?) end def from_self? -- cgit