Skip to content

Commit 811e369

Browse files
committed
Revert "Correção com chatwoot"
This reverts commit f58e792.
1 parent fe1a93d commit 811e369

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,10 +2100,10 @@ export class ChatwootService {
21002100
const nameFile = `${random}.${mimeTypes.extension(mimeType)}`;
21012101
const fileData = Buffer.from(imgBuffer.data, 'binary');
21022102

2103-
const img = await Jimp.fromBuffer(fileData);
2104-
img.cover(320, 180);
2103+
const img = await Jimp.read(fileData);
2104+
await img.cover(320, 180);
21052105

2106-
const processedBuffer = await img.getBuffer('image/png');
2106+
const processedBuffer = await img.getBufferAsync(Jimp.MIME_PNG);
21072107

21082108
const fileStream = new Readable();
21092109
fileStream._read = () => {}; // _read is required but you can noop it

0 commit comments

Comments
 (0)