mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: allow staff members to restore withdrawn posts that are flagged
This commit is contained in:
@ -26,6 +26,7 @@ module FlagQuery
|
||||
p.post_number,
|
||||
p.hidden,
|
||||
p.deleted_at,
|
||||
p.user_deleted,
|
||||
(SELECT created_at FROM post_revisions WHERE post_id = p.id AND user_id = p.user_id ORDER BY created_at DESC LIMIT 1) AS last_revised_at,
|
||||
(SELECT COUNT(*) FROM post_actions WHERE (disagreed_at IS NOT NULL OR agreed_at IS NOT NULL OR deferred_at IS NOT NULL) AND post_id = p.id)::int AS previous_flags_count
|
||||
FROM posts p
|
||||
|
Reference in New Issue
Block a user