update
This commit is contained in:
parent
8472d79279
commit
63c16b7a6e
@ -122,13 +122,14 @@ async def wechat_corp_callback(
|
|||||||
if event == 'change_external_chat':
|
if event == 'change_external_chat':
|
||||||
chat_id = msg_root.find('ChatId').text
|
chat_id = msg_root.find('ChatId').text
|
||||||
change_type = msg_root.find('ChangeType').text
|
change_type = msg_root.find('ChangeType').text
|
||||||
|
update_detail = msg_root.find('UpdateDetail')
|
||||||
|
|
||||||
# 处理进群事件
|
# 处理进群事件
|
||||||
if change_type == 'add_member':
|
if update_detail == 'add_member':
|
||||||
userid = msg_root.find('UserId').text
|
userid = msg_root.find('MemChangeList')[0].find('Item').text
|
||||||
unionid = await wecom_client.get_unionid_from_userid(userid)
|
unionid = await wecom_client.get_unionid_from_userid(userid)
|
||||||
print(f"根据userid获取unionid结果: {unionid}")
|
print(f"根据userid获取unionid结果: {unionid}")
|
||||||
|
|
||||||
|
|
||||||
return Response(content="success", media_type="text/plain")
|
return Response(content="success", media_type="text/plain")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user