fix(WeiXin): version migration

This commit is contained in:
xcosmosbox 2026-03-24 15:51:15 +08:00 committed by Xubin Ren
parent 0dad6124a2
commit 0ccfcf6588
2 changed files with 3 additions and 2 deletions

View File

@ -757,6 +757,7 @@ pip install -e ".[weixin]"
> - `allowFrom`: Add the sender ID you see in nanobot logs for your WeChat account. Use `["*"]` to allow all users.
> - `token`: Optional. If omitted, log in interactively and nanobot will save the token for you.
> - `routeTag`: Optional. When your upstream Weixin deployment requires request routing, nanobot will send it as the `SKRouteTag` header.
> - `stateDir`: Optional. Defaults to nanobot's runtime directory for Weixin state.
> - `pollTimeout`: Optional long-poll timeout in seconds.

View File

@ -4,7 +4,7 @@ Uses the ilinkai.weixin.qq.com API for personal WeChat messaging.
No WebSocket, no local WeChat client needed just HTTP requests with a
bot token obtained via QR code login.
Protocol reverse-engineered from ``@tencent-weixin/openclaw-weixin`` v1.0.2.
Protocol reverse-engineered from ``@tencent-weixin/openclaw-weixin`` v1.0.3.
"""
from __future__ import annotations
@ -799,7 +799,7 @@ class WeixinChannel(BaseChannel):
) -> None:
"""Upload a local file to WeChat CDN and send it as a media message.
Follows the exact protocol from ``@tencent-weixin/openclaw-weixin`` v1.0.2:
Follows the exact protocol from ``@tencent-weixin/openclaw-weixin`` v1.0.3:
1. Generate a random 16-byte AES key (client-side).
2. Call ``getuploadurl`` with file metadata + hex-encoded AES key.
3. AES-128-ECB encrypt the file and POST to CDN (``{cdnBaseUrl}/upload``).