From cd2ff54d31a9e2453308e0da3406f605f95bc79c Mon Sep 17 00:00:00 2001 From: PrivacyDev Date: Sat, 17 Jun 2023 23:06:20 -0400 Subject: [PATCH] fixed bug that caused some retweets to be rendered as truncated tweets starting with the text "RT @" --- src/parser.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/parser.nim b/src/parser.nim index 5b0d584..8809c96 100644 --- a/src/parser.nim +++ b/src/parser.nim @@ -230,8 +230,11 @@ proc parseTweet(js: JsonNode; jsCard: JsonNode = newJNull()): Tweet = # graphql with rt, js{"retweeted_status_result", "result"}: # needed due to weird edgecase where the actual tweet data isn't included - if "legacy" in rt: - result.retweet = some parseGraphTweet(rt) + var rt_tweet = rt + if "tweet" in rt: + rt_tweet = rt{"tweet"} + if "legacy" in rt_tweet: + result.retweet = some parseGraphTweet(rt_tweet) return if jsCard.kind != JNull: