Use TweetResultByRestId for embeds

This commit is contained in:
Zed 2026-08-08 23:00:19 +07:00
commit ccde22aa0b
4 changed files with 23 additions and 4 deletions

View file

@ -751,6 +751,10 @@ proc parseGraphTweetResult*(js: JsonNode): Tweet =
with tweet, js{"data", "tweet_result", "result"}:
result = parseGraphTweet(tweet)
proc parseTweetByRestId*(js: JsonNode): Tweet =
with tweet, js{"data", "tweetResult", "result"}:
result = parseGraphTweet(tweet)
proc parseGraphTweetResults*(js: JsonNode): seq[Tweet] =
let results = js{"data", "tweetResult"}
if results.kind != JArray: return