@recipient.user.settings.interactions['must_be_following'] && !following_sender?
end
+ def message?
+ @notification.type == :mention
+ end
+
def direct_message?
- @notification.type == :mention && @notification.target_status.direct_visibility?
+ message? && @notification.target_status.direct_visibility?
end
def response_to_recipient?
def optional_non_following_and_direct?
direct_message? &&
@recipient.user.settings.interactions['must_be_following_dm'] &&
- !from_staff? &&
!following_sender? &&
!response_to_recipient?
end
def blocked?
blocked = @recipient.suspended? # Skip if the recipient account is suspended anyway
blocked ||= from_self? # Skip for interactions with self
+
+ return blocked if message? && from_staff?
+
blocked ||= domain_blocking? # Skip for domain blocked accounts
blocked ||= @recipient.blocking?(@notification.from_account) # Skip for blocked accounts
blocked ||= @recipient.muting_notifications?(@notification.from_account)