Skip to content

Commit

Permalink
Fix logic of block/mute bypass for mentions from moderators (mastodon…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and nileane committed Aug 19, 2024
1 parent 909a261 commit 9952b63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/services/notify_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def response_to_recipient?
end

def from_staff?
@notification.from_account.local? && @notification.from_account.user.present? && @notification.from_account.user_role&.overrides?(@recipient.user_role)
sender = @notification.from_account
sender.local? && sender.user.present? && sender.user_role&.overrides?(@recipient.user_role) && @sender.user_role&.highlighted? && sender.user_role&.can?(*UserRole::Flags::CATEGORIES[:moderation])
end

def optional_non_following_and_direct?
Expand Down

0 comments on commit 9952b63

Please sign in to comment.