mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-02-16 08:16:06 +08:00
feat: verify server when receive message in wechatmp
This commit is contained in:
@@ -21,6 +21,7 @@ class Query:
|
||||
# Make sure to return the instance that first created, @singleton will do that.
|
||||
channel = WechatMPChannel()
|
||||
try:
|
||||
verify_server(web.input())
|
||||
message = web.data() # todo crypto
|
||||
# logger.debug("[wechatmp] Receive request:\n" + webData.decode("utf-8"))
|
||||
msg = parse_message(message)
|
||||
|
||||
@@ -20,6 +20,7 @@ class Query:
|
||||
|
||||
def POST(self):
|
||||
try:
|
||||
verify_server(web.input())
|
||||
request_time = time.time()
|
||||
channel = WechatMPChannel()
|
||||
message = web.data() # todo crypto
|
||||
|
||||
Reference in New Issue
Block a user