mirror of https://github.com/zulip/zulip.git
Actually use our tz-aware datetime object when changing awareness
(imported from commit e0f85534fa12a712dd8c61b66abd687d36ba9088)
This commit is contained in:
parent
5a56e7cd29
commit
8b90d4bb8a
|
@ -1332,8 +1332,8 @@ def handle_missedmessage_emails(user_profile_id, missed_email_events):
|
|||
last_reminder = last_reminder.replace(tzinfo=utc)
|
||||
|
||||
waitperiod = datetime.timedelta(hours=UserProfile.EMAIL_REMINDER_WAITPERIOD)
|
||||
if len(messages) == 0 or (user_profile.last_reminder and \
|
||||
timestamp - user_profile.last_reminder < waitperiod):
|
||||
if len(messages) == 0 or (last_reminder and \
|
||||
timestamp - last_reminder < waitperiod):
|
||||
# Don't spam the user, if we've sent an email in the last day
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue