Thumbnail images saved from caption

This commit is contained in:
SillyLossy
2023-04-18 00:26:52 +03:00
parent a71190aa5f
commit 61d62312a0

View File

@ -77,7 +77,8 @@ async function onSelectImage(e) {
if (apiResult.ok) {
const data = await apiResult.json();
const caption = data.caption;
await sendCaptionedMessage(caption, base64Img);
const imageToSave = data.thumbnail ? `data:image/jpeg;base64,${data.thumbnail}` : base64Img;
await sendCaptionedMessage(caption, imageToSave);
}
}
catch (error) {