mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Add proper tombstone for subscriber tweets
This commit is contained in:
parent
b516ec367b
commit
e3b3b38a2d
2 changed files with 17 additions and 14 deletions
|
|
@ -381,16 +381,15 @@ proc parsePhotoRail*(js: JsonNode): PhotoRail =
|
|||
|
||||
proc parseGraphTweet(js: JsonNode): Tweet =
|
||||
if js.kind == JNull:
|
||||
return Tweet(available: false)
|
||||
return Tweet()
|
||||
|
||||
case js{"__typename"}.getStr
|
||||
of "TweetUnavailable", "TweetPreviewDisplay":
|
||||
return Tweet(available: false)
|
||||
of "TweetUnavailable":
|
||||
return Tweet()
|
||||
of "TweetTombstone":
|
||||
return Tweet(
|
||||
available: false,
|
||||
text: js{"tombstone", "text"}.getTombstone
|
||||
)
|
||||
return Tweet(text: js{"tombstone", "text"}.getTombstone)
|
||||
of "TweetPreviewDisplay":
|
||||
return Tweet(text: "You're unable to view this Tweet because it's only available to the Subscribers of the account owner.")
|
||||
of "TweetWithVisibilityResults":
|
||||
return parseGraphTweet(js{"tweet"})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue