mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 03:26:30 +00:00
Fix edgecase conversation replies nil crash
This commit is contained in:
parent
369dc994b8
commit
5ae2e57da8
1 changed files with 4 additions and 2 deletions
|
@ -35,12 +35,14 @@ macro genMediaGet(media: untyped; token=false) =
|
||||||
futs.add `single`(convo.tweet, agent, token)
|
futs.add `single`(convo.tweet, agent, token)
|
||||||
futs.add `multi`(convo.before, agent, token=token)
|
futs.add `multi`(convo.before, agent, token=token)
|
||||||
futs.add `multi`(convo.after, agent, token=token)
|
futs.add `multi`(convo.after, agent, token=token)
|
||||||
futs.add convo.replies.content.mapIt(`multi`(it, agent, token=token))
|
if convo.replies != nil:
|
||||||
|
futs.add convo.replies.content.mapIt(`multi`(it, agent, token=token))
|
||||||
else:
|
else:
|
||||||
futs.add `single`(convo.tweet, agent)
|
futs.add `single`(convo.tweet, agent)
|
||||||
futs.add `multi`(convo.before, agent)
|
futs.add `multi`(convo.before, agent)
|
||||||
futs.add `multi`(convo.after, agent)
|
futs.add `multi`(convo.after, agent)
|
||||||
futs.add convo.replies.content.mapIt(`multi`(it, agent))
|
if convo.replies != nil:
|
||||||
|
futs.add convo.replies.content.mapIt(`multi`(it, agent))
|
||||||
await all(futs)
|
await all(futs)
|
||||||
|
|
||||||
proc getGuestToken(agent: string; force=false): Future[string] {.async.} =
|
proc getGuestToken(agent: string; force=false): Future[string] {.async.} =
|
||||||
|
|
Loading…
Reference in a new issue