mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: Put back the TL3 -> TL0 spam thing
We talked about it and decided it's still relevant in the score world.
This commit is contained in:
@ -156,6 +156,15 @@ private
|
||||
return if @post.hidden?
|
||||
return if !@created_by.staff? && @post.user&.staff?
|
||||
|
||||
# Special case: If you have TL3 and the user is TL0, and the flag is spam,
|
||||
# hide it immediately.
|
||||
if @post_action_name == :spam &&
|
||||
@created_by.has_trust_level?(TrustLevel[3]) &&
|
||||
@post.user&.trust_level == TrustLevel[0]
|
||||
@post.hide!(@post_action_type_id, Post.hidden_reasons[:flagged_by_tl3_user])
|
||||
return
|
||||
end
|
||||
|
||||
score = ReviewableFlaggedPost.find_by(target: @post)&.score || 0
|
||||
if score >= Reviewable.score_required_to_hide_post
|
||||
@post.hide!(@post_action_type_id)
|
||||
|
Reference in New Issue
Block a user