docs: Add a document explaining email/push notifications.

With various fixes by Mateusz Mandera.
This commit is contained in:
Tim Abbott
2020-12-18 18:05:20 -08:00
parent de74d2fd7c
commit b15cb27fcc
7 changed files with 185 additions and 11 deletions

View File

@@ -765,7 +765,7 @@ def missedmessage_hook(
def receiver_is_off_zulip(user_profile_id: int) -> bool:
# If a user has no message-receiving event queues, they've got no open zulip
# session so we notify them
# session so we notify them.
all_client_descriptors = get_client_descriptors_for_user(user_profile_id)
message_event_queues = [
client for client in all_client_descriptors if client.accepts_messages()
@@ -789,7 +789,11 @@ def maybe_enqueue_notifications(
) -> Dict[str, bool]:
"""This function has a complete unit test suite in
`test_enqueue_notifications` that should be expanded as we add
more features here."""
more features here.
See https://zulip.readthedocs.io/en/latest/subsystems/notifications.html
for high-level design documentation.
"""
notified: Dict[str, bool] = {}
if (idle or always_push_notify) and (