post hint can be 'rich:video', 'hosted:video' etc, so just check if it has ':video'

This commit is contained in:
teddit 2021-01-24 15:18:07 +01:00
parent 185cf22847
commit f1d02aac1a

View File

@ -52,7 +52,7 @@ module.exports = function() {
} else {
if(data.preview.images[0].resolutions[0]) {
let preview = null
if(!isGif(data.url) && data.post_hint !== 'rich:video')
if(!isGif(data.url) && !data.post_hint.includes(':video'))
preview = await downloadAndSave(data.preview.images[0].source.url)
images = {
thumb: await downloadAndSave(data.preview.images[0].resolutions[0].url, 'thumb_'),