|
|
@@ -643,7 +643,7 @@ def scheduled_task_add_contacts_from_chatrooms(self, redis_config, kafka_config, |
|
|
|
# 任务状态推送到kafka |
|
|
|
k_message = wx_add_contacts_from_chatroom_task_status(wxid, chatroom_id, 2) |
|
|
|
await kafka_service.send_message_async(k_message) |
|
|
|
return |
|
|
|
continue |
|
|
|
|
|
|
|
logger.info(f'{nickname}-{wxid} 在 {chatroom_nickname} 群里还可以邀请的好友有:{[x.get("nickName") for x in remaining_chatroot_members]}') |
|
|
|
for m in remaining_chatroot_members: |
|
|
@@ -674,7 +674,7 @@ def scheduled_task_add_contacts_from_chatrooms(self, redis_config, kafka_config, |
|
|
|
# 已经邀请过两次,不再邀请 |
|
|
|
if len(sorted_history) == 2: |
|
|
|
logger.info(f'{nickname}-{wxid}在{chatroom_nickname}-{chatroom_id} 群的 {member_nickname}-{contact_wxid} 已经邀请过2次,不再邀请') |
|
|
|
return |
|
|
|
continue |
|
|
|
|
|
|
|
# 当天邀请过,不再邀请 |
|
|
|
if len(sorted_history) > 0: |
|
|
@@ -698,7 +698,7 @@ def scheduled_task_add_contacts_from_chatrooms(self, redis_config, kafka_config, |
|
|
|
is_more_than_one_day = is_add_time_more_than_one_day(last_add_time) |
|
|
|
if not is_more_than_one_day: |
|
|
|
logger.info(f'{nickname}-{wxid}在{chatroom_nickname}-{chatroom_id} 群的 {member_nickname}-{contact_wxid} 已经当天邀请,不再邀请') |
|
|
|
return |
|
|
|
continue |
|
|
|
|
|
|
|
ret, msg, data = await gewe_service.add_group_member_as_friend_async(token_id, app_id, chatroom_id, m.get('wxid'), |
|
|
|
f'我是群聊"{chatroom_nickname}"群的{nickname}') |
|
|
|