From e9dd216b8893d8d4c04499938f7d36041635f21d Mon Sep 17 00:00:00 2001 From: H Vs Date: Thu, 13 Mar 2025 10:07:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8D=E7=89=87=E7=AB=8B=E5=88=BB=E5=8A=A0?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/messages_resource.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/messages_resource.py b/resources/messages_resource.py index 3e6a369..04ea4ce 100644 --- a/resources/messages_resource.py +++ b/resources/messages_resource.py @@ -166,8 +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) - - gewe_chat.wxchat.add_contacts(token_id,app_id,scene,Models.OperationType.ADD_FRIEND,v3,v4,alias_value) + nickname=utils.get_login_info_by_wxid(wxid).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) except ET.ParseError as e: logger.error(f"XML解析错误: {e}")