Files
openclaw/src/web
Yachiyo Tsukimido (猫猫) 9d73a63487 fix(whatsapp): use stream mode for media download to fix empty audio buffer
Fixes #4636

## Problem
WhatsApp voice messages (audio/ogg) were being saved as 0-byte files while
image downloads worked correctly. The issue is that Baileys 7.x
`downloadMediaMessage` with "buffer" mode returns empty data for audio
messages.

## Solution
- Changed from "buffer" mode to "stream" mode in `downloadInboundMedia()`
- Manually collect stream chunks and concatenate into buffer
- Added validation to detect and handle empty buffers

## Testing
- Voice messages now download correctly with actual audio data
- Image downloads continue to work as before
- Tested with WhatsApp voice notes (ogg/opus format)

Before fix: 0 bytes
After fix: 11488 bytes (actual audio data)
2026-01-30 21:24:16 +08:00
..
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-14 15:02:19 +00:00
2026-01-14 15:02:19 +00:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-24 01:18:58 +00:00
2026-01-30 03:16:21 +01:00
2026-01-14 15:02:19 +00:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-14 15:02:19 +00:00