mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:21:12 +08:00
Remove special cases for flagging
Prior to the new review queue there were a couple special cases where posts would be auto hidden: * If a TL3 or above flagged a TL0 post as spam * If a TL4 or above flagged a non-staff, non-TL4 post as spam, inappropriate or off topic. These cases are now removed in favour of the scoring system.
This commit is contained in:
@ -156,22 +156,9 @@ private
|
||||
return if @post.hidden?
|
||||
return if !@created_by.staff? && @post.user&.staff?
|
||||
|
||||
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])
|
||||
elsif PostActionType.auto_action_flag_types.include?(@post_action_name)
|
||||
if @created_by.has_trust_level?(TrustLevel[4]) &&
|
||||
!@created_by.staff? &&
|
||||
@post.user&.trust_level != TrustLevel[4]
|
||||
|
||||
@post.hide!(@post_action_type_id, Post.hidden_reasons[:flagged_by_tl4_user])
|
||||
else
|
||||
score = ReviewableFlaggedPost.find_by(target: @post)&.score || 0
|
||||
if score >= Reviewable.score_required_to_hide_post
|
||||
@post.hide!(@post_action_type_id)
|
||||
end
|
||||
end
|
||||
score = ReviewableFlaggedPost.find_by(target: @post)&.score || 0
|
||||
if score >= Reviewable.score_required_to_hide_post
|
||||
@post.hide!(@post_action_type_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user