From adfd31c530cdfae052333123cd5999b333043bd3 Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 7 Feb 2022 21:58:06 +0100 Subject: [PATCH] Fix timeline parser --- src/parser.nim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parser.nim b/src/parser.nim index ae5e505..d3d62cf 100644 --- a/src/parser.nim +++ b/src/parser.nim @@ -375,7 +375,12 @@ proc parseTimeline*(js: JsonNode; after=""): Timeline = result.parseInstructions(global, instructions) - for e in instructions[0]{"addEntries", "entries"}: + var entries: JsonNode + for i in instructions: + if "addEntries" in i: + entries = i{"addEntries", "entries"} + + for e in ? entries: let entry = e{"entryId"}.getStr if "tweet" in entry or entry.startsWith("sq-I-t") or "tombstone" in entry: let tweet = finalizeTweet(global, e.getEntryId)