From 7ebfd9f0beea4fdcddf59f9e85704a720102564f Mon Sep 17 00:00:00 2001 From: H Vs Date: Fri, 28 Feb 2025 09:03:40 +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 --- resources/messages_resource.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/messages_resource.py b/resources/messages_resource.py index 155cede..7813019 100644 --- a/resources/messages_resource.py +++ b/resources/messages_resource.py @@ -47,11 +47,16 @@ class MessagesResource(Resource): wx_config = gewe_chat.wxchat.get_wxchat_config_from_cache(wxid) - if not bool(wx_config.get("agentEnabled",False)): - logger.info(f'微信ID {wxid} 未托管,不处理') - return jsonify({"message": "收到微信回调消息"}) + # if not bool(wx_config.get("agentEnabled",False)): + # logger.info(f'微信ID {wxid} 未托管,不处理') + # return jsonify({"message": "收到微信回调消息"}) if type_name=='AddMsg': + + if not bool(wx_config.get("agentEnabled",False)): + logger.info(f'微信ID {wxid} 未托管,不处理') + return jsonify({"message": "收到微信回调消息"}) + #wxid = msg.get("Wxid") msg_data = msg.get("Data") msg_type = msg_data.get("MsgType",None)