Skip to content

Commit 253c724

Browse files
authored
Update chatwoot.service.ts
1 parent 4f94728 commit 253c724

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import axios from 'axios';
2626
import { proto } from 'baileys';
2727
import dayjs from 'dayjs';
2828
import FormData from 'form-data';
29-
import { Jimp } from 'jimp';
29+
import { Jimp, JimpMime } from 'jimp';
3030
import Long from 'long';
3131
import mimeTypes from 'mime-types';
3232
import path from 'path';
@@ -2103,8 +2103,7 @@ export class ChatwootService {
21032103
const img = await Jimp.read(fileData);
21042104
await img.cover(320, 180);
21052105

2106-
const mime = img.getMIME();
2107-
const processedBuffer = await img.getBufferAsync(mime);
2106+
const processedBuffer = await img.getBuffer(JimpMime.png);
21082107

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

0 commit comments

Comments
 (0)