This commit is contained in:
AKW 2023-12-29 17:42:29 +08:00
parent 02fa8b83d2
commit 11b29da03a
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ def save_add_contact_by_channel(data, corpinfo, *args, **kwargs):
now = datetime.now()
nine_minute_ago = now - timedelta(minutes=9)
uid = hook_user.uid
rc = SimpleLock(f'{corpid}:{userid}:{externaluserid}')
createtime = data.get('createtime')
rc = SimpleLock(f'{corpid}:{userid}:{externaluserid}:{createtime}')
success = rc.try_lock(60 * 10)
if hook_user.utime > nine_minute_ago and hook_user.new_user and success:
# 发送消息