mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 13:47:15 +08:00
feat(wechatmp): add support for message encryption
- Add support for message encryption in WeChat MP channel. - Add `wechatmp_aes_key` configuration item to `config.json`.
This commit is contained in:
@@ -17,7 +17,7 @@ def verify_server(data):
|
||||
signature = data.signature
|
||||
timestamp = data.timestamp
|
||||
nonce = data.nonce
|
||||
echostr = data.echostr
|
||||
echostr = data.get("echostr", None)
|
||||
token = conf().get("wechatmp_token") # 请按照公众平台官网\基本配置中信息填写
|
||||
check_signature(token, signature, timestamp, nonce)
|
||||
return echostr
|
||||
|
||||
Reference in New Issue
Block a user