mirror of https://github.com/zulip/zulip.git
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:
parent
6b64ef6be3
commit
a8cd91d6c7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue