Fix sensitive media being rendered as unavailable

This commit is contained in:
Zed 2019-07-10 23:38:52 +02:00
parent 069ff60fdc
commit fad2575d93
1 changed files with 5 additions and 2 deletions

View File

@ -87,8 +87,11 @@ proc parseTweet*(node: XmlNode): Tweet =
let quote = tweet.select(".QuoteTweet-innerContainer") let quote = tweet.select(".QuoteTweet-innerContainer")
if quote != nil: if quote != nil:
result.quote = some(parseQuote(quote)) result.quote = some(parseQuote(quote))
elif tweet.select(".Tombstone") != nil:
result.quote = some(Quote()) let tombstone = tweet.select(".Tombstone")
if tombstone != nil:
if "unavailable" in tombstone.innerText():
result.quote = some(Quote())
proc parseThread*(nodes: XmlNode): Thread = proc parseThread*(nodes: XmlNode): Thread =
if nodes == nil: return if nodes == nil: return