discord: fix tag search commands being limited to 2 tags.

This commit is contained in:
evazion
2021-03-14 16:20:55 -05:00
parent 808c039f03
commit 28c0a48117
10 changed files with 29 additions and 21 deletions

View File

@@ -4,7 +4,7 @@ class CountsController < ApplicationController
def posts
estimate_count = params.fetch(:estimate_count, "true").truthy?
skip_cache = params.fetch(:skip_cache, "false").truthy?
@count = PostQueryBuilder.new(params[:tags], CurrentUser.user).normalized_query.fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
@count = PostQueryBuilder.new(params[:tags], CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).normalized_query.fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
if request.format.xml?
respond_with({ posts: @count }, root: "counts")