Zed пре 6 година
родитељ
комит
a2c0e1a21d
2 измењених фајлова са 5 додато и 1 уклоњено
  1. 1 1
      src/parser.nim
  2. 4 0
      src/parserutils.nim

+ 1 - 1
src/parser.nim

@@ -379,5 +379,5 @@ proc parsePhotoRail*(tl: Timeline): PhotoRail =
     result.add GalleryPhoto(
       url: url,
       tweetId: $tweet.id,
-      color: "#161616" # TODO: photo rail specific parser?
+      color: "#161616"
     )

+ 4 - 0
src/parserutils.nim

@@ -102,6 +102,10 @@ proc getTombstone*(js: JsonNode): string =
     result = "This account owner limits who can view their tweets."
   of "Missing":
     result = "This tweet is unavailable."
+  of "Deactivated":
+    result = "This tweet is from an account that no longer exists."
+  of "Bounced":
+    result = "This tweet violated the Twitter rules."
   else:
     result = js{"tombstoneInfo", "richText", "text"}.getStr
     if epitaph.len > 0 or result.len > 0: