Show reasons for tweets being withheld

Fixes #33
This commit is contained in:
Zed
2019-09-08 14:34:26 +02:00
parent 8208676e6e
commit 9ff3ba2005
5 changed files with 30 additions and 7 deletions

View File

@@ -100,7 +100,10 @@ proc createTimelineRouter*(cfg: Config) =
let conversation = await getTweet(@"name", @"id", getAgent())
if conversation == nil or conversation.tweet.id.len == 0:
resp Http404, showError("Tweet not found", cfg.title)
if conversation.tweet.tombstone.len > 0:
resp Http404, showError(conversation.tweet.tombstone, cfg.title)
else:
resp Http404, showError("Tweet not found", cfg.title)
let path = getPath()
let title = pageTitle(conversation.tweet.profile)