1
0
Fork 0
mirror of https://github.com/zedeus/nitter.git synced 2025-04-21 08:24:05 +00:00

fix: add missing fields

This commit is contained in:
guanbinrui 2025-04-02 23:45:39 +08:00
parent dc655d3961
commit 846183d0f6
No known key found for this signature in database
GPG key ID: 849DB262B0F9CFE6

View file

@ -58,8 +58,10 @@ proc formatTweetAsJson*(tweet: Tweet): JsonNode =
tweet.retweet)) else: newJNull(),
"attribution": if tweet.attribution.isSome: formatUserAsJson(get(
tweet.attribution)) else: newJNull(),
"mediaTags": if tweet.mediaTags.len > 0: %tweet.mediaTags.map(formatUserAsJson) else: newJNull(),
"quote": if tweet.quote.isSome: formatTweetAsJson(get(
tweet.quote)) else: newJNull(),
"card": if tweet.card.isSome: %*get(tweet.card) else: newJNull(),
"poll": if tweet.poll.isSome: %*get(tweet.poll) else: newJNull(),
"gif": if tweet.gif.isSome: %*get(tweet.gif) else: newJNull(),
"video": if tweet.video.isSome: %*get(tweet.video) else: newJNull(),