Support even more obscure card types

This commit is contained in:
Zed
2020-06-10 16:13:40 +02:00
parent 77994e8246
commit 0c9c37e886
4 changed files with 16 additions and 7 deletions

View File

@@ -82,8 +82,10 @@ proc getCardTitle*(js: JsonNode; kind: CardKind): string =
result = js{"title"}.getStrVal
if kind == promoVideoConvo:
result = js{"thank_you_text"}.getStrVal(result)
if kind == liveEvent:
elif kind == liveEvent:
result = js{"event_category"}.getStrVal
elif kind in {videoDirectMessage, imageDirectMessage}:
result = js{"cta1"}.getStrVal
proc getBanner*(js: JsonNode): string =
let url = js{"profile_banner_url"}.getImageStr