Skip to content
Snippets Groups Projects
Commit af634231 authored by Zed's avatar Zed
Browse files

Support card previews

parent ed91133b
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,12 @@ proc createStatusRouter*(cfg: Config) =
elif conv.tweet.gif.isSome():
images = @[get(conv.tweet.gif).thumb]
video = getPicUrl(get(conv.tweet.gif).url)
elif conv.tweet.card.isSome():
let card = conv.tweet.card.get()
if card.image.len > 0:
images = @[card.image]
elif card.video.isSome():
video = getVideoEmbed(cfg, parseInt(card.video.get().videoId))
let html = renderConversation(conv, prefs, getPath() & "#m")
resp renderMain(html, request, cfg, prefs, title, desc, ogTitle,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment