From 763a671549697189d362a5c3142c30397e8bf795 Mon Sep 17 00:00:00 2001 From: H Vs Date: Tue, 22 Apr 2025 09:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=BA=E5=B7=A5=E6=89=98?= =?UTF-8?q?=E7=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/endpoints/pipeline_endpoint.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/endpoints/pipeline_endpoint.py b/app/endpoints/pipeline_endpoint.py index 6c276f7..ffd306c 100644 --- a/app/endpoints/pipeline_endpoint.py +++ b/app/endpoints/pipeline_endpoint.py @@ -75,7 +75,7 @@ async def get_messages(request: Request, body: Dict[str, Any]): async def handle_self_cmd_async(request: Request,wxid,msg): ''' 个人微信命令处理 - 如果是个人微信的指令,wxid == to_wxid + 如果是个人微信的指令,from_wxid == to_wxid commands = { '启用托管': True, '关闭托管': False @@ -374,21 +374,21 @@ async def handle_text_async(request: Request,token_id,app_id, wxid,msg_data,from return # 判断是否转人工处理功能 - is_human_handle_msg= await request.app.state.gewe_service.is_human_handle_msg_async(wxid) + is_human_handle_msg= await request.app.state.gewe_service.is_human_handle_msg_async(to_wxid) if is_human_handle_msg: - logger.warning(f'微信号 {wxid} 暂时工人接管30分钟中') + logger.warning(f'微信号 {wxid} 发送到微信号{to_wxid} 暂时工人接管30分钟中') return msg_content=msg_data["Content"]["string"] - if from_wxid == to_wxid: #手动发送消息 + if wxid == from_wxid: #手动发送消息 logger.info("Active message sending detected") await request.app.state.gewe_service.save_contacts_brief_to_cache_async(token_id,app_id,wxid,[to_wxid]) callback_to_user=msg_data["ToUserName"]["string"] # 转人工处理功能 - await request.app.state.gewe_service.set_human_handle_msg_async(wxid,60*30) + await request.app.state.gewe_service.set_human_handle_msg_async(to_wxid,60*30) # 推送到kafka input_wx_content_dialogue_message=[{"type": "text", "text": msg_content}]