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