fix: update config in wxoa

This commit is contained in:
wangcham
2025-03-13 05:15:03 -04:00
parent aabb01c50f
commit c7799a65c4
2 changed files with 3 additions and 4 deletions

View File

@@ -93,16 +93,15 @@ class OfficialAccountAdapter(adapter.MessagePlatformAdapter):
if missing_keys:
raise ParamNotEnoughError("微信公众号缺少相关配置项,请查看文档或联系管理员")
# 模式1为15s内回复模式2为超过15s回复
if self.config['Mode'] == 1:
if self.config['Mode'] == "drop":
self.bot = OAClient(
token=config['token'],
EncodingAESKey=config['EncodingAESKey'],
Appsecret=config['AppSecret'],
AppID=config['AppID'],
)
if self.config['Mode'] == 2:
if self.config['Mode'] == "passive":
self.bot = OAClientForLongerResponse(
token=config['token'],
EncodingAESKey=config['EncodingAESKey'],

View File

@@ -77,7 +77,7 @@
"EncodingAESKey":"",
"AppID":"",
"AppSecret":"",
"Mode":1,
"Mode":"drop",
"host": "0.0.0.0",
"port": 2287
},