소스 검색

调整

d1
H Vs 3 주 전
부모
커밋
58772bd716
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. +5
    -4
      tasks.py

+ 5
- 4
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)


Loading…
취소
저장