From 4ef042f179714dc7b691641a7d6262a51c49d026 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 16 Apr 2025 15:51:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robot.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/robot.py b/robot.py index 78dd601..2b7a6f8 100644 --- a/robot.py +++ b/robot.py @@ -373,6 +373,14 @@ class Robot(Job): self.contact_manager.update_contact(msg.sender, nickName[0]) self.send_text_msg(f"Hi {nickName[0]},我自动通过了你的好友请求。", msg.sender) + # 添加一个方法用于刷新联系人信息 + def refresh_contacts(self): + """刷新联系人信息""" + self.allContacts = self.get_all_contacts() + self.all_head_img = self.get_all_head_img_url() + self.contact_manager.refresh_contacts(self.allContacts,self.all_head_img, self.wcf) + self.LOG.info("联系人信息已刷新") + def send_group_txt_message(self, msg: str, feature: Feature): try: receivers = self.gbm.get_group_list() @@ -530,11 +538,3 @@ class Robot(Job): self.wcf.send_file(pub_path, "45317011307@chatroom") except Exception as e: self.LOG.error(f"xiu_ren_pdf_send error:{e}") - - # 添加一个方法用于刷新联系人信息 - def refresh_contacts(self): - """刷新联系人信息""" - self.allContacts = self.get_all_contacts() - self.all_head_img = self.get_all_head_img_url() - self.contact_manager.refresh_contacts(self.allContacts,self.all_head_img, self.wcf) - self.LOG.info("联系人信息已刷新")