From c13f6c4346a0461b34c24f65204715b130052b89 Mon Sep 17 00:00:00 2001 From: Vlad Iliescu Date: Mon, 10 Jun 2024 11:10:18 +0100 Subject: [PATCH 1/2] fix build issue --- src/Utils/messages-media.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/messages-media.ts b/src/Utils/messages-media.ts index 623fba512f..db606a8d40 100644 --- a/src/Utils/messages-media.ts +++ b/src/Utils/messages-media.ts @@ -208,7 +208,7 @@ export async function getAudioDuration(buffer: Buffer | string | Readable) { */ export async function getAudioWaveform(buffer: Buffer | string | Readable, logger?: Logger) { try { - const audioDecode = (...args) => import('audio-decode').then(({ default: audioDecode }) => audioDecode(...args)) + const audioDecode = (buffer: Buffer | ArrayBuffer | Uint8Array) => import('audio-decode').then(({ default: audioDecode }) => audioDecode(buffer)) let audioData: Buffer if(Buffer.isBuffer(buffer)) { audioData = buffer From 7b7fd33af19945a9480d04745b95f0a9f65c66d9 Mon Sep 17 00:00:00 2001 From: Vlad Iliescu Date: Mon, 10 Jun 2024 11:11:39 +0100 Subject: [PATCH 2/2] npm run build:tsc --- lib/Utils/messages-media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Utils/messages-media.js b/lib/Utils/messages-media.js index afa1da22de..313548d458 100644 --- a/lib/Utils/messages-media.js +++ b/lib/Utils/messages-media.js @@ -217,7 +217,7 @@ exports.getAudioDuration = getAudioDuration; */ async function getAudioWaveform(buffer, logger) { try { - const audioDecode = (...args) => import('audio-decode').then(({ default: audioDecode }) => audioDecode(...args)); + const audioDecode = (buffer) => import('audio-decode').then(({ default: audioDecode }) => audioDecode(buffer)); let audioData; if (Buffer.isBuffer(buffer)) { audioData = buffer;