Fix Weixin media uploads#10342
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Weixin adapter’s outbound media helpers to match the shared gateway adapter method signatures and fixes/locks in correct iLink media upload behavior (CDN upload method + AES key encoding), with regression tests to prevent re-breakage.
Changes:
- Align
WeixinAdapter.send_image_fileandsend_documentsignatures with the base adapter contract (keyword-friendly parameters and**kwargs). - Ensure outbound media upload uses
POSTforupload_full_urland that iLink payloadaes_keyis encoded asbase64(hex_string). - Add tests covering keyword argument support,
upload_full_urlPOST behavior, and AES key encoding in the outbound media payload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
gateway/platforms/weixin.py |
Updates outbound media method signatures and enforces correct CDN upload + AES key encoding in iLink payloads. |
tests/gateway/test_weixin.py |
Adds regression tests for Weixin outbound media keyword args and upload/crypto payload behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Merged as part of Batch-5 salvage: #11634 Your commit cherry-picked onto Commit SHA on main: 8dcd08d |
Summary
Testing