From 58772bd716ffa3dbb86ade68cb229d340cb90c4e Mon Sep 17 00:00:00 2001 From: H Vs Date: Tue, 1 Apr 2025 09:44:53 +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 --- tasks.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tasks.py b/tasks.py index c6f3009..4d8e6ef 100644 --- a/tasks.py +++ b/tasks.py @@ -230,11 +230,12 @@ def scheduled_task_add_contacts_from_chatrooms(self, redis_config, kafka_config, chatroom_member=await gewe_service.get_group_members_from_cache_async(wxid, chatroom_id) chatroom_nickname = chatroom.get('nickName') chatroom_owner_wxid = chatroom_member.get('chatroomOwner', None) - admin_wxid = chatroom_member.get('adminWxid', None) - logger.info(f'{chatroom_nickname} 的群主是 {chatroom_owner_wxid},管理员是{admin_wxid}') + admin_wxids = chatroom_member.get('adminWxid', []) + logger.info(f'{chatroom_nickname} 的群主是 {chatroom_owner_wxid},管理员是{admin_wxids}') contact_wxids_set = set(contact_wxids) - if admin_wxid is not None: - contact_wxids_set.add(admin_wxid) + # for admin_wxid in admin_wxids: + # contact_wxids_set.add(admin_wxid) + contact_wxids_set.update(admin_wxids) if chatroom_owner_wxid is not None: contact_wxids_set.add(chatroom_owner_wxid)