This commit is contained in:
Jose Sanchis 2025-07-16 10:02:54 +00:00 committed by GitHub
commit 6100202d61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View File

@ -73,7 +73,7 @@
"form-data": "^4.0.1",
"https-proxy-agent": "^7.0.6",
"i18next": "^23.7.19",
"jimp": "^0.16.13",
"jimp": "^1.6.0",
"json-schema": "^0.4.0",
"jsonschema": "^1.4.1",
"jsonwebtoken": "^9.0.2",
@ -95,7 +95,7 @@
"qrcode": "^1.5.4",
"qrcode-terminal": "^0.12.0",
"redis": "^4.7.0",
"sharp": "^0.32.6",
"sharp": "^0.34.2",
"socket.io": "^4.8.1",
"socket.io-client": "^4.8.1",
"tsup": "^8.3.5"

View File

@ -26,7 +26,7 @@ import axios from 'axios';
import { proto } from 'baileys';
import dayjs from 'dayjs';
import FormData from 'form-data';
import Jimp from 'jimp';
import { Jimp, JimpMime } from 'jimp';
import Long from 'long';
import mimeTypes from 'mime-types';
import path from 'path';
@ -2101,9 +2101,9 @@ export class ChatwootService {
const fileData = Buffer.from(imgBuffer.data, 'binary');
const img = await Jimp.read(fileData);
await img.cover(320, 180);
img.cover({ w: 320, h: 180 });
const processedBuffer = await img.getBufferAsync(Jimp.MIME_PNG);
const processedBuffer = await img.getBuffer(JimpMime.png);
const fileStream = new Readable();
fileStream._read = () => {}; // _read is required but you can noop it

View File

@ -11,6 +11,7 @@
"outDir": "./dist",
"noEmitOnError": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"strict": false,
"skipLibCheck": true,
@ -34,4 +35,4 @@
"src/**/*",
"src/**/*.json"
]
}
}