mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Handle withheld tweets (#429)
* Handle withheld tweets * Fix format of parser.nim
This commit is contained in:
parent
739eb12bed
commit
cf47c1b8ad
5 changed files with 29 additions and 1 deletions
|
|
@ -226,6 +226,8 @@ proc renderQuote(quote: Tweet; prefs: Prefs; path: string): VNode =
|
|||
tdiv(class="unavailable-quote"):
|
||||
if quote.tombstone.len > 0:
|
||||
text quote.tombstone
|
||||
elif quote.text.len > 0:
|
||||
text quote.text
|
||||
else:
|
||||
text "This tweet is unavailable"
|
||||
|
||||
|
|
@ -278,9 +280,14 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; index=0;
|
|||
tdiv(class="unavailable-box"):
|
||||
if tweet.tombstone.len > 0:
|
||||
text tweet.tombstone
|
||||
elif tweet.text.len > 0:
|
||||
text tweet.text
|
||||
else:
|
||||
text "This tweet is unavailable"
|
||||
|
||||
if tweet.quote.isSome:
|
||||
renderQuote(tweet.quote.get(), prefs, path)
|
||||
|
||||
let fullTweet = tweet
|
||||
var retweet: string
|
||||
var tweet = fullTweet
|
||||
|
|
|
|||
Loading…
Reference in a new issue