Update messages-media.ts (#1988)

Fix of issue https://github.com/WhiskeySockets/Baileys/issues/1986
This commit is contained in:
Anychat LLC
2025-11-19 15:19:56 +02:00
committed by GitHub
parent 9e7de2f494
commit 2779c9df08
+1 -1
View File
@@ -372,7 +372,7 @@ export const getHttpStream = async (url: string | URL, options: RequestInit & {
}
// @ts-ignore Node18+ Readable.fromWeb exists
return Readable.fromWeb(response.body as any)
return response.body instanceof Readable ? response.body : Readable.fromWeb(response.body as any)
}
type EncryptedStreamOptions = {