From a2c0e1a21d1945bbaa6fd62e948f0440afb1265f Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 1 Jun 2020 08:14:58 +0200 Subject: [PATCH] Add missing tombstones --- src/parser.nim | 2 +- src/parserutils.nim | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/parser.nim b/src/parser.nim index 636ffae..66e7195 100644 --- a/src/parser.nim +++ b/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" ) diff --git a/src/parserutils.nim b/src/parserutils.nim index f4f7746..01d60c1 100644 --- a/src/parserutils.nim +++ b/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: