File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,8 +51,12 @@ def optional_non_following?
5151 @recipient . user . settings . interactions [ 'must_be_following' ] && !following_sender?
5252 end
5353
54+ def message?
55+ @notification . type == :mention
56+ end
57+
5458 def direct_message?
55- @notification . type == :mention && @notification . target_status . direct_visibility?
59+ message? && @notification . target_status . direct_visibility?
5660 end
5761
5862 def response_to_recipient?
@@ -66,7 +70,6 @@ def from_staff?
6670 def optional_non_following_and_direct?
6771 direct_message? &&
6872 @recipient . user . settings . interactions [ 'must_be_following_dm' ] &&
69- !from_staff? &&
7073 !following_sender? &&
7174 !response_to_recipient?
7275 end
@@ -86,6 +89,9 @@ def domain_blocking?
8689 def blocked?
8790 blocked = @recipient . suspended? # Skip if the recipient account is suspended anyway
8891 blocked ||= from_self? # Skip for interactions with self
92+
93+ return blocked if message? && from_staff?
94+
8995 blocked ||= domain_blocking? # Skip for domain blocked accounts
9096 blocked ||= @recipient . blocking? ( @notification . from_account ) # Skip for blocked accounts
9197 blocked ||= @recipient . muting_notifications? ( @notification . from_account )
You can’t perform that action at this time.
0 commit comments