Skip to content

Commit 47b8d19

Browse files
authored
Always let through notifications from staff (#9152)
* Always let through notifications from staff Follow-up to #8993 * Let messages from staff through, but no other notifications
1 parent a03d506 commit 47b8d19

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

app/services/notify_service.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)