mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: disagree flag should unhide hidden post
This commit is contained in:
@@ -44,7 +44,6 @@ class Admin::FlagsController < Admin::AdminController
|
||||
|
||||
PostAction.clear_flags!(post, current_user)
|
||||
|
||||
post.reload
|
||||
post.unhide!
|
||||
|
||||
render nothing: true
|
||||
|
||||
@@ -50,14 +50,8 @@ class PostActionsController < ApplicationController
|
||||
guardian.ensure_can_defer_flags!(@post)
|
||||
|
||||
PostAction.defer_flags!(@post, current_user)
|
||||
@post.reload
|
||||
|
||||
if @post.is_flagged?
|
||||
render json: { success: true, hidden: true }
|
||||
else
|
||||
@post.unhide!
|
||||
render json: { success: true, hidden: false }
|
||||
end
|
||||
render json: { success: true }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user