Download images, videos and files inside Combine and Forward (49/19) messages
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design, databases
Research direction
Start with wechat-core/src/forwarded.rs and trace how forwarded::render orders nested items, then inspect media discovery and CDN download planning. The issue describes unit tests for numbering, key decoding, asset IDs, and download plans. Done means forwarded image, video, and file items with CDN metadata appear as downloadable assets with the matching recordItem; videos and files still need live verification.
Written by the indexing model from the issue text.
Description
What are you trying to do?
Let an agent see the images, videos and files inside a Combine and Forward message (appmsg 49/19).
Today the items are rendered into body (wechat-core/src/forwarded.rs), and an image or file item without a title becomes [media]. Its bytes cannot be fetched: GET /v1/accounts/{a}/messages/{id}/media answers 409 unsupported_application_media, because discover accepts only subtype 6 among application messages. An agent that receives a forwarded history of screenshots sees seven [media] lines and nothing else.
Does the official WeChat client do this?
Yes. Phone and desktop WeChat both open a forwarded chat history and show each image, play each video and open each file in it.
How should it work? (optional)
Each dataitem of datatype 2 (image), 4 (video) or 8 (file) that carries cdndataurl and cdndatakey becomes one asset of the message:
- downloaded over the existing CDN path (
DownloadPlan::Cdn; quality Original for images, Video for videos, File or LargeFile bydatasizefor files;fullmd5anddatasizeas the expected digest and size); recordItem: the item's position, counted the wayforwarded::renderlists the items (depth first, nested histories included), so a client can tie each asset to a line ofbody;- the position joins the asset ID digest only for these assets, so the IDs of all other assets stay the same;
official_writeback: "unsupported": the official profile has no place for them.
cdndatakey appears either as 32 hex digits or as those digits hex-encoded once more as text (64 hex digits); both decode to the 16-byte key.
How we'd know it works: GET …/messages/{id}/media on a forward lists one asset per image, video or file with its recordItem, and POST …/media-transfers with that assetId makes it available with the advertised size.
I built this on v3.4.1 (linux x64) and checked it on a real account: a forward of 3 texts and 7 images listed 7 image assets, and all 7 full images downloaded with exactly the advertised datasize and a valid PNG signature. The same items' cdnthumburl / cdnthumbkey were refused as thumbnail downloads (media_service_rejected), so the change lists full copies only. Not yet checked live: videos and files inside a forward.
It adds an optional MediaAsset.recordItem (integer), so it would need interfaces-approved. The change is about 350 lines in wechat-core, with unit tests for the numbering, the key forms, the asset IDs and the plans. If this direction works for you, I'll open the PR.
- Dominant language
- Rust
- Stars
- 319
- Forks
- 131
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 349
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from thisnick/agent-wechat
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
thisnick/agent-wechat#908 ·
Maintainers usually reply within 1 day
-
question
Difficulty 4/5 3-5 days Newbie friendliness 42/100
thisnick/agent-wechat#894 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement postponed
Difficulty 5/5 Over a week Newbie friendliness 38/100
thisnick/agent-wechat#840 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
thisnick/agent-wechat#701 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement postponed
Difficulty 5/5 Over a week Newbie friendliness 35/100
thisnick/agent-wechat#456 · 2 comments ·
Maintainers usually reply within 1 day
All issues in thisnick/agent-wechat
Similar issues
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Apich-Organization/rssn#295 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
FortoGraphy/prism-download-manager#242 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws/aws-emulator#727 ·