mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-22 22:25:32 +00:00
handled unavailable in renderEmbeddedTweet
This commit is contained in:
parent
0d3469df66
commit
3579bd8e30
|
@ -284,7 +284,18 @@ proc renderEmbeddedTweet*(tweet: Tweet; cfg: Config; prefs: Prefs; path: string)
|
|||
tweet = tweet.retweet.get
|
||||
retweet = fullTweet.profile.fullname
|
||||
|
||||
# handle unavailable
|
||||
if not tweet.available:
|
||||
return buildHtml(tdiv(class="unavailable timeline-item")):
|
||||
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)
|
||||
|
||||
buildHtml(tdiv(class="timeline-item")):
|
||||
renderHead(prefs, cfg)
|
||||
|
|
Loading…
Reference in a new issue