fix(all): Fix in AS IMAGE generation of single row.

This commit is contained in:
Rodrigo Rodriguez 2023-07-23 16:44:42 -03:00
parent e1bfc3758c
commit 6874869ef8

View file

@ -1180,11 +1180,10 @@ export class DialogKeywords {
const imageData = await (await fetch(url)).arrayBuffer(); const imageData = await (await fetch(url)).arrayBuffer();
const base64Image = Buffer.from(imageData).toString('base64'); const base64Image = Buffer.from(imageData).toString('base64');
const contentType = mime.lookup(url); const contentType = mime.lookup(url);
const ext = mime.extension(contentType);
reply['attachments'] = []; reply['attachments'] = [];
reply['attachments'].push({ reply['attachments'].push({
name: filename, name: filename,
contentType: ext, contentType: contentType,
contentUrl: `data:${contentType};base64,${base64Image}` contentUrl: `data:${contentType};base64,${base64Image}`
}); });