Do not parse cards for images and videos

This commit is contained in:
Cynthia Foxwell 2024-12-17 17:02:08 -07:00
parent 1e9d4bae83
commit 9129820cb0

View File

@ -86,12 +86,12 @@ proc createStatusRouter*(cfg: Config) =
let gif = get(conv.tweet.gif) let gif = get(conv.tweet.gif)
images = @[gif.thumb] images = @[gif.thumb]
video = getPicUrl(gif.url) video = getPicUrl(gif.url)
elif conv.tweet.card.isSome(): #elif conv.tweet.card.isSome():
let card = conv.tweet.card.get() # let card = conv.tweet.card.get()
if card.image.len > 0: # if card.image.len > 0:
images = @[card.image] # images = @[card.image]
elif card.video.isSome(): # elif card.video.isSome():
images = @[card.video.get().thumb] # images = @[card.video.get().thumb]
let html = renderConversation(conv, prefs, getPath() & "#m") let html = renderConversation(conv, prefs, getPath() & "#m")
resp renderMain(html, request, cfg, prefs, title, desc, ogTitle, resp renderMain(html, request, cfg, prefs, title, desc, ogTitle,