Files
goclaw/internal
Duc Nguyen 150c2b3c01 fix(zalo): correctly forward inbound reference images to the agent (#1353)
fix(zalo): correctly forward inbound reference images to the agent

Fixes #1352.

Three compounding bugs prevented zalo_personal from using photos as vision/image-generation references:
1. Zalo CDN URLs often lack usable extensions, so downloads landed as .bin and were misclassified as documents (not images). fixDownloadedExt sniffs content and renames correctly.
2. Photo captions (user's actual instruction) were dropped — now appended after the media tag.
3. Quoted photos were never downloaded — extractQuoteMedia + ParseAttachment now fetch the actual image.

Tests cover fixDownloadedExt and ParseAttachment helpers. Live-verified against production Zalo traffic.
2026-07-05 01:57:25 +07:00
..