mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-10 05:00:59 +00:00
fix: update config in wxoa
This commit is contained in:
@@ -93,16 +93,15 @@ class OfficialAccountAdapter(adapter.MessagePlatformAdapter):
|
|||||||
if missing_keys:
|
if missing_keys:
|
||||||
raise ParamNotEnoughError("微信公众号缺少相关配置项,请查看文档或联系管理员")
|
raise ParamNotEnoughError("微信公众号缺少相关配置项,请查看文档或联系管理员")
|
||||||
|
|
||||||
# 模式1为15s内回复,模式2为超过15s回复
|
|
||||||
|
|
||||||
if self.config['Mode'] == 1:
|
if self.config['Mode'] == "drop":
|
||||||
self.bot = OAClient(
|
self.bot = OAClient(
|
||||||
token=config['token'],
|
token=config['token'],
|
||||||
EncodingAESKey=config['EncodingAESKey'],
|
EncodingAESKey=config['EncodingAESKey'],
|
||||||
Appsecret=config['AppSecret'],
|
Appsecret=config['AppSecret'],
|
||||||
AppID=config['AppID'],
|
AppID=config['AppID'],
|
||||||
)
|
)
|
||||||
if self.config['Mode'] == 2:
|
if self.config['Mode'] == "passive":
|
||||||
self.bot = OAClientForLongerResponse(
|
self.bot = OAClientForLongerResponse(
|
||||||
token=config['token'],
|
token=config['token'],
|
||||||
EncodingAESKey=config['EncodingAESKey'],
|
EncodingAESKey=config['EncodingAESKey'],
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
"EncodingAESKey":"",
|
"EncodingAESKey":"",
|
||||||
"AppID":"",
|
"AppID":"",
|
||||||
"AppSecret":"",
|
"AppSecret":"",
|
||||||
"Mode":1,
|
"Mode":"drop",
|
||||||
"host": "0.0.0.0",
|
"host": "0.0.0.0",
|
||||||
"port": 2287
|
"port": 2287
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user