mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 08:07:17 +08:00
FEATURE: New modal to show flags received for a user
This commit is contained in:
@ -145,6 +145,16 @@ module FlagQuery
|
||||
post_actions = post_actions.where("topics.id = ?", opts[:topic_id])
|
||||
end
|
||||
|
||||
if opts[:user_id]
|
||||
post_actions = post_actions.where("posts.user_id = ?", opts[:user_id])
|
||||
end
|
||||
|
||||
if opts[:filter] == 'without_custom'
|
||||
return post_actions.where(
|
||||
'post_action_type_id' => PostActionType.flag_types_without_custom.values
|
||||
)
|
||||
end
|
||||
|
||||
if opts[:filter] == "old"
|
||||
post_actions.where("post_actions.disagreed_at IS NOT NULL OR
|
||||
post_actions.deferred_at IS NOT NULL OR
|
||||
|
Reference in New Issue
Block a user