mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: prevents admins to be silenced (#21854)
Currently in chat it was possible to have TL4 users to flag admins and silence them, this change should ensure it's never possible.
This commit is contained in:
@ -87,6 +87,7 @@ module Chat
|
||||
return if reviewable.score <= Chat::ReviewableMessage.score_to_silence_user
|
||||
|
||||
user = reviewable.target_created_by
|
||||
return if user.admin?
|
||||
return unless user
|
||||
return if user.silenced?
|
||||
|
||||
|
Reference in New Issue
Block a user