Support gif link previews

This commit is contained in:
Zed
2019-08-07 22:27:24 +02:00
parent ec5f67123a
commit 0da26ab197
3 changed files with 16 additions and 13 deletions

View File

@ -96,7 +96,12 @@ routes:
if conversation.tweet.video.isSome():
let thumb = get(conversation.tweet.video).thumb
let vidUrl = getVideoEmbed(get(conversation.tweet.video))
let vidUrl = getVideoEmbed(conversation.tweet.id)
resp renderMain(html, title=cfg.title, titleText=title, desc=desc,
images = @[thumb], `type`="video", video=vidUrl)
elif conversation.tweet.gif.isSome():
let thumb = get(conversation.tweet.gif).thumb
let vidUrl = getVideoEmbed(conversation.tweet.id)
resp renderMain(html, title=cfg.title, titleText=title, desc=desc,
images = @[thumb], `type`="video", video=vidUrl)
else: