mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
Reset our 24hr email blackout when a user logs in
(imported from commit 93bed7c4d049ba4d7b30d2e02fbbe0d2debca6f8)
This commit is contained in:
@@ -1215,8 +1215,9 @@ def handle_missedmessage_emails(user_profile_id, missed_email_events):
|
||||
message__id__in=message_ids,
|
||||
flags=~UserMessage.flags.read)]
|
||||
|
||||
if len(messages) == 0 or (user_profile.last_reminder and
|
||||
timestamp - user_profile.last_reminder < datetime.timedelta(days=1)):
|
||||
waitperiod = datetime.timedelta(hours=UserProfile.EMAIL_REMINDER_WAITPERIOD)
|
||||
if len(messages) == 0 or (user_profile.last_reminder and \
|
||||
timestamp - user_profile.last_reminder < waitperiod):
|
||||
# Don't spam the user, if we've sent an email in the last day
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user