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:
Joffrey JAFFEUX
2023-06-01 08:36:11 +02:00
committed by GitHub
parent 96a2893284
commit 9ba333808f
2 changed files with 13 additions and 0 deletions

View File

@ -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?