mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-02 09:22:36 +00:00
fix(WeiXin): version migration
This commit is contained in:
parent
0dad6124a2
commit
0ccfcf6588
@ -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.
|
||||
|
||||
|
||||
@ -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``).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user