From 63c16b7a6eaaf6213850720a4091413e5699ddcd Mon Sep 17 00:00:00 2001 From: aaron <> Date: Mon, 3 Mar 2025 08:44:42 +0800 Subject: [PATCH] update --- app/api/endpoints/wecom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/api/endpoints/wecom.py b/app/api/endpoints/wecom.py index 4783872..e569210 100644 --- a/app/api/endpoints/wecom.py +++ b/app/api/endpoints/wecom.py @@ -122,13 +122,14 @@ async def wechat_corp_callback( if event == 'change_external_chat': chat_id = msg_root.find('ChatId').text change_type = msg_root.find('ChangeType').text + update_detail = msg_root.find('UpdateDetail') # 处理进群事件 - if change_type == 'add_member': - userid = msg_root.find('UserId').text + if update_detail == 'add_member': + userid = msg_root.find('MemChangeList')[0].find('Item').text unionid = await wecom_client.get_unionid_from_userid(userid) print(f"根据userid获取unionid结果: {unionid}") - + return Response(content="success", media_type="text/plain")