Fix replies again
This commit is contained in:
parent
312ff78628
commit
62f8edf027
1 changed files with 6 additions and 4 deletions
|
@ -49,14 +49,16 @@ proc getReplyQuery*(name: string): Query =
|
||||||
)
|
)
|
||||||
|
|
||||||
proc genQueryParam*(query: Query; rewriteReplies=true): string =
|
proc genQueryParam*(query: Query; rewriteReplies=true): string =
|
||||||
var filters: seq[string]
|
var
|
||||||
var param: string
|
filters: seq[string]
|
||||||
let rewrite =
|
param: string
|
||||||
rewriteReplies and query.fromUser.len > 0 and query.kind != tweets
|
|
||||||
|
|
||||||
if query.kind == users:
|
if query.kind == users:
|
||||||
return query.text
|
return query.text
|
||||||
|
|
||||||
|
let rewrite = rewriteReplies and query.fromUser.len > 0 and
|
||||||
|
query.kind notin {tweets, replies}
|
||||||
|
|
||||||
for i, user in query.fromUser:
|
for i, user in query.fromUser:
|
||||||
if rewrite:
|
if rewrite:
|
||||||
param &= &"(from:{user}(to:{user} OR -filter:replies)) "
|
param &= &"(from:{user}(to:{user} OR -filter:replies)) "
|
||||||
|
|
Loading…
Reference in a new issue