discord: fix tag search commands being limited to 2 tags.
This commit is contained in:
@@ -19,7 +19,7 @@ class DiscordSlashCommand
|
||||
|
||||
def call
|
||||
tags = params[:tags]
|
||||
query = PostQueryBuilder.new(tags, User.anonymous).normalized_query
|
||||
query = PostQueryBuilder.new(tags, User.anonymous, tag_limit: nil).normalized_query
|
||||
count = query.fast_count(estimate_count: true, skip_cache: true)
|
||||
|
||||
respond_with("`#{tags}`: #{count} posts")
|
||||
|
||||
@@ -28,7 +28,7 @@ class DiscordSlashCommand
|
||||
def call
|
||||
tags = params[:tags]
|
||||
limit = params.fetch(:limit, 3).clamp(1, 10)
|
||||
posts = Post.user_tag_match(tags, User.anonymous).limit(limit)
|
||||
posts = Post.user_tag_match(tags, User.anonymous, tag_limit: nil).limit(limit)
|
||||
|
||||
respond_with(posts: posts)
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ class DiscordSlashCommand
|
||||
def call
|
||||
tags = params[:tags]
|
||||
limit = params.fetch(:limit, 1).clamp(1, 10)
|
||||
posts = Post.user_tag_match(tags, User.anonymous).random(limit)
|
||||
posts = Post.user_tag_match(tags, User.anonymous, tag_limit: nil).random(limit)
|
||||
|
||||
respond_with(posts: posts)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user