From 62f8edf027f6d1658797fd342ea8991af07edb8b Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 20 May 2020 07:06:45 +0200 Subject: [PATCH] Fix replies again --- src/query.nim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/query.nim b/src/query.nim index b60a490..5ab0391 100644 --- a/src/query.nim +++ b/src/query.nim @@ -49,14 +49,16 @@ proc getReplyQuery*(name: string): Query = ) proc genQueryParam*(query: Query; rewriteReplies=true): string = - var filters: seq[string] - var param: string - let rewrite = - rewriteReplies and query.fromUser.len > 0 and query.kind != tweets + var + filters: seq[string] + param: string if query.kind == users: return query.text + let rewrite = rewriteReplies and query.fromUser.len > 0 and + query.kind notin {tweets, replies} + for i, user in query.fromUser: if rewrite: param &= &"(from:{user}(to:{user} OR -filter:replies)) "