FIX: Add original upload markdown on caption failure (#762)
This commit is contained in:
parent
dd63ade348
commit
c0328267be
|
@ -145,6 +145,9 @@ export default apiInitializer("1.25.0", (api) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const caption = await fetchImageCaption(upload.url, "long_url");
|
const caption = await fetchImageCaption(upload.url, "long_url");
|
||||||
|
if (!caption) {
|
||||||
|
return getUploadMarkdown(upload);
|
||||||
|
}
|
||||||
return `![${caption}|${upload.thumbnail_width}x${upload.thumbnail_height}](${upload.short_url})`;
|
return `![${caption}|${upload.thumbnail_width}x${upload.thumbnail_height}](${upload.short_url})`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue