mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-22 02:07:13 +00:00
feat:add support for wechat official account
This commit is contained in:
@@ -106,13 +106,14 @@ class OAClient():
|
|||||||
|
|
||||||
if self.msg_id_map.get(message_data["MsgId"], 1) == 3:
|
if self.msg_id_map.get(message_data["MsgId"], 1) == 3:
|
||||||
|
|
||||||
response_xml = xml_template.format(
|
# response_xml = xml_template.format(
|
||||||
to_user=from_user,
|
# to_user=from_user,
|
||||||
from_user=to_user,
|
# from_user=to_user,
|
||||||
create_time=int(time.time()),
|
# create_time=int(time.time()),
|
||||||
content = "请求失效:暂不支持公众号超过15秒的请求,如有需求,请联系 LangBot 团队。"
|
# content = "请求失效:暂不支持公众号超过15秒的请求,如有需求,请联系 LangBot 团队。"
|
||||||
)
|
# )
|
||||||
return response_xml
|
print("请求失效:暂不支持公众号超过15秒的请求,如有需求,请联系 LangBot 团队。")
|
||||||
|
return ''
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|||||||
@@ -65,6 +65,16 @@
|
|||||||
"callback_url": "http://your-callback-url:2286/gewechat/callback",
|
"callback_url": "http://your-callback-url:2286/gewechat/callback",
|
||||||
"app_id": "",
|
"app_id": "",
|
||||||
"token": ""
|
"token": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"adapter":"officialaccount",
|
||||||
|
"enable": true,
|
||||||
|
"token": "",
|
||||||
|
"EncodingAESKey":"",
|
||||||
|
"AppSecret":"",
|
||||||
|
"AppID":"",
|
||||||
|
"host": "0.0.0.0",
|
||||||
|
"port": 2287
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"track-function-calls": true,
|
"track-function-calls": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user