mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
digest: Add a large block comment on correctness.
This commit is contained in:
@@ -372,6 +372,18 @@ def bulk_write_realm_audit_logs(users: List[UserProfile]) -> None:
|
||||
RealmAuditLog.objects.bulk_create(log_rows)
|
||||
|
||||
def get_modified_streams(user_ids: List[int], cutoff_date: datetime.datetime) -> Dict[int, Set[int]]:
|
||||
"""Skipping streams where the user's subscription status has changed
|
||||
when constructing digests is critical to ensure correctness for
|
||||
streams without shared history, guest users, and long-term idle
|
||||
users, because it means that every user has the same view of the
|
||||
history of a given stream whose message history is being included
|
||||
(and thus we can share a lot of work).
|
||||
|
||||
The downside is that newly created streams are never included in
|
||||
the first digest email after their creation. Should we wish to
|
||||
change that, we will need to be very careful to avoid creating
|
||||
bugs for any of those classes of users.
|
||||
"""
|
||||
events = [
|
||||
RealmAuditLog.SUBSCRIPTION_CREATED,
|
||||
RealmAuditLog.SUBSCRIPTION_ACTIVATED,
|
||||
|
||||
Reference in New Issue
Block a user