A platform for community discussion. Free, open, simple.
FIX: Only apply post hide logic to flag actions
Robin Ward7ae071282af5
diff --git a/lib/post_action_creator.rb b/lib/post_action_creator.rbindex 215345c4250..eacf1d312c6 100644--- a/lib/post_action_creator.rb+++ b/lib/post_action_creator.rb@@ -163,11 +163,11 @@ private@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)+ elsif PostActionType.auto_action_flag_types.include?(@post_action_name)+ score = ReviewableFlaggedPost.find_by(target: @post)&.score || 0+ if score >= Reviewable.score_required_to_hide_post+ @post.hide!(@post_action_type_id)+ endendend