mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-26 00:59:24 +01:00
fixes for the #134 PR
This commit is contained in:
parent
666a4bdd01
commit
185cf22847
@ -51,9 +51,12 @@ module.exports = function() {
|
||||
}
|
||||
} else {
|
||||
if(data.preview.images[0].resolutions[0]) {
|
||||
let preview = null
|
||||
if(!isGif(data.url) && data.post_hint !== 'rich:video')
|
||||
preview = await downloadAndSave(data.preview.images[0].source.url)
|
||||
images = {
|
||||
thumb: await downloadAndSave(data.preview.images[0].resolutions[0].url, 'thumb_'),
|
||||
preview: await downloadAndSave(data.preview.images[0].source.url, 'preview_')
|
||||
preview: preview
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user