digest: send emails if you've been active for slightly less than a day.

That way if all you do is briefly check Zulip because you got the
email, we'll send you another one tomorrow.

(imported from commit fcbbd264c5e5fea7352f0fee6989e000af7b7bed)
This commit is contained in:
Jessica McKellar 2013-12-16 17:30:21 -05:00
parent 6b64ef6be3
commit a8cd91d6c7
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ def inactive_since(user_profile, cutoff):
return last_visit < cutoff
def last_business_day():
one_day = datetime.timedelta(hours=24)
one_day = datetime.timedelta(hours=23)
previous_day = datetime.datetime.now(tz=pytz.utc) - one_day
while previous_day.weekday() not in VALID_DIGEST_DAYS:
previous_day -= one_day