mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-25 18:08:40 -06:00
Update chatwoot.service.ts
This commit is contained in:
parent
aeaf38f6c0
commit
8b0b59d8fb
@ -26,7 +26,7 @@ import axios from 'axios';
|
|||||||
import { proto } from 'baileys';
|
import { proto } from 'baileys';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import FormData from 'form-data';
|
import FormData from 'form-data';
|
||||||
import Jimp from 'jimp';
|
import Jimp, { MIME_PNG } from 'jimp';
|
||||||
import Long from 'long';
|
import Long from 'long';
|
||||||
import mimeTypes from 'mime-types';
|
import mimeTypes from 'mime-types';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
@ -2103,7 +2103,7 @@ export class ChatwootService {
|
|||||||
const img = await Jimp.read(fileData);
|
const img = await Jimp.read(fileData);
|
||||||
await img.cover(320, 180);
|
await img.cover(320, 180);
|
||||||
|
|
||||||
const processedBuffer = await img.getBufferAsync(Jimp.MIME_PNG);
|
const processedBuffer = await img.getBufferAsync(MIME_PNG);
|
||||||
|
|
||||||
const fileStream = new Readable();
|
const fileStream = new Readable();
|
||||||
fileStream._read = () => {}; // _read is required but you can noop it
|
fileStream._read = () => {}; // _read is required but you can noop it
|
||||||
|
Loading…
Reference in New Issue
Block a user