flags: fix flagger:<name> not returning self-flagged uploads
Fix the search `flagger:evazion user:evazion` not returning the user's own self-flagged uploads.
Followup to a6e0872ce.
Fixes #4690: user profile 'flags' count links to /post_flags with different search criteria
This commit is contained in:
@@ -170,7 +170,7 @@ class PostQueryBuilder
|
||||
when "approver"
|
||||
relation.approver_matches(value)
|
||||
when "flagger"
|
||||
relation.flagger_matches(value, current_user)
|
||||
relation.user_subquery_matches(PostFlag.unscoped.category_matches("normal"), value, current_user)
|
||||
when "appealer"
|
||||
relation.user_subquery_matches(PostAppeal.unscoped, value, current_user)
|
||||
when "commenter", "comm"
|
||||
|
||||
Reference in New Issue
Block a user