diff --git a/app/api/endpoints/wecom.py b/app/api/endpoints/wecom.py index e569210..a06a116 100644 --- a/app/api/endpoints/wecom.py +++ b/app/api/endpoints/wecom.py @@ -113,20 +113,30 @@ async def wechat_corp_callback( # 解析基本信息 msg_type = msg_root.find('MsgType').text + + print(f"msg_type: {msg_type}") # 处理事件消息 if msg_type == 'event': event = msg_root.find('Event').text + + print(f"event: {event}") # 处理进群事件 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') + + print(f"chat_id: {chat_id}") + print(f"change_type: {change_type}") + print(f"update_detail: {update_detail}") # 处理进群事件 + if update_detail == 'add_member': userid = msg_root.find('MemChangeList')[0].find('Item').text + print(f"userid: {userid}") unionid = await wecom_client.get_unionid_from_userid(userid) print(f"根据userid获取unionid结果: {unionid}")