From 855e9ac14b926c8c90582333b008c0b608cfd588 Mon Sep 17 00:00:00 2001 From: H Vs Date: Thu, 13 Mar 2025 11:39:58 +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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/messages_resource.py b/resources/messages_resource.py index eca9086..6fefe5a 100644 --- a/resources/messages_resource.py +++ b/resources/messages_resource.py @@ -166,7 +166,9 @@ def handle_name_card(token_id,app_id, wxid,msg_data,from_wxid, to_wxid): # 将加好友资料添加到待加好友队列 #gewe_chat.wxchat.enqueue_to_add_contacts(wxid,scene,v3,v4) - nickname=utils.get_login_info_by_wxid(wxid).get('nickName') + _,loginfo=utils.get_login_info_by_wxid(wxid) + + nickname=loginfo.get('nickName') add_contact_content=f'您好,我是{nickname}' #gewe_chat.wxchat.add_contacts(token_id,app_id,scene,Models.OperationType.ADD_FRIEND,v3,v4,add_contact_content) gewe_chat.wxchat.add_contacts(token_id,app_id,scene,Models.OperationType.ADD_FRIEND.value,v3,v4,add_contact_content)