modqueue: fix the disapproved: metatag showing posts outside the queue.

Fix a bug where filtering the modqueue by the `disapproved:<reason>` tag
would return posts outside the modqueue.
This commit is contained in:
evazion
2022-09-29 22:30:14 -05:00
parent d51cc17eaf
commit 559bf1ae0a
4 changed files with 49 additions and 4 deletions

View File

@@ -1391,7 +1391,7 @@ class Post < ApplicationRecord
post_query = PostQuery.normalize(query, current_user: user, tag_limit: tag_limit, safe_mode: safe_mode)
post_query.validate_tag_limit!
posts = post_query.with_implicit_metatags.posts
merge(posts)
and_relation(posts)
end
def search(params, current_user)
@@ -1409,7 +1409,7 @@ class Post < ApplicationRecord
)
if params[:tags].present?
q = q.user_tag_match(params[:tags], current_user)
q = q.where(id: user_tag_match(params[:tags], current_user).select(:id))
end
if params[:order].present?