Fix logic of block/mute bypass for mentions from moderators (#31271)

This commit is contained in:
Claire 2024-08-07 08:52:10 +02:00 committed by GitHub
parent c8b9e60ec1
commit 719cabe024
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 35 additions and 1 deletions

View file

@ -48,7 +48,7 @@ class NotifyService < BaseService
end
def from_staff?
@sender.local? && @sender.user.present? && @sender.user_role&.overrides?(@recipient.user_role)
@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 from_self?