mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
Update node-webpmux 2.x syntax to 3.x (support upstream breaking change) (#762)
Co-authored-by: Apeiron <apeiron@none>
This commit is contained in:
@@ -183,9 +183,9 @@ class Util {
|
|||||||
let jsonBuffer = Buffer.from(JSON.stringify(json), 'utf8');
|
let jsonBuffer = Buffer.from(JSON.stringify(json), 'utf8');
|
||||||
let exif = Buffer.concat([exifAttr, jsonBuffer]);
|
let exif = Buffer.concat([exifAttr, jsonBuffer]);
|
||||||
exif.writeUIntLE(jsonBuffer.length, 14, 4);
|
exif.writeUIntLE(jsonBuffer.length, 14, 4);
|
||||||
await img.loadBuffer(Buffer.from(webpMedia.data, 'base64'));
|
await img.load(Buffer.from(webpMedia.data, 'base64'));
|
||||||
img.exif = exif;
|
img.exif = exif;
|
||||||
webpMedia.data = (await img.saveBuffer()).toString('base64');
|
webpMedia.data = (await img.save(null)).toString('base64');
|
||||||
}
|
}
|
||||||
|
|
||||||
return webpMedia;
|
return webpMedia;
|
||||||
|
|||||||
Reference in New Issue
Block a user