From 4697aa38a5ca9a672e09b6affa3451d4dff9c7cd Mon Sep 17 00:00:00 2001 From: H Vs Date: Sun, 16 Feb 2025 01:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 3 ++- resources/messages_resource.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 741af65..2cc0a80 100644 --- a/app.py +++ b/app.py @@ -83,7 +83,8 @@ def fetch_and_save_contacts2(): time.sleep(3) - time.sleep(60*10) + #time.sleep(60*10) + time.sleep(3600*24) def start_wxchat_thread(): diff --git a/resources/messages_resource.py b/resources/messages_resource.py index 67b9951..93c3624 100644 --- a/resources/messages_resource.py +++ b/resources/messages_resource.py @@ -33,13 +33,14 @@ class MessagesResource(Resource): logger.warning('找不到登录信息,不处理') return jsonify({"message": "收到微信回调消息"}) + wxid = msg.get("Wxid",'') wx_config = gewe_chat.wxchat.get_wxchat_config_from_cache(wxid) if not bool(wx_config.get("agentEnabled",False)): logger.info('智能体未启用,不处理') return jsonify({"message": "收到微信回调消息"}) if type_name=='AddMsg': - wxid = msg.get("Wxid") + #wxid = msg.get("Wxid") msg_data = msg.get("Data") msg_type = msg_data.get("MsgType",None) from_wxid = msg_data["FromUserName"]["string"]