zulip/zerver
Sahil Batra 2396e6858f users: Always pass "delivery_email" field in user objects.
Previously, user objects contained delivery_email field
only when user had access to real email. Also, delivery_email
was not present if visibility setting is set to "everyone"
as email field was itself set to real email.

This commit changes the code to pass "delivery_email" field
always in the user objects with its value being "None" if
user does not have access to real email and real email otherwise.
The "delivery_email" field value is None for logged-out users.
For bots, the "delivery_email" is always set to real email
irrespective of email_address_visibility setting.

Also, since user has access to real email if visibility is set
to "everyone", "delivery_email" field is passed in that case
too.

There is no change in email field and it is same as before.

This commit also adds code to send event to update delivery_email
field when email_address_visibility setting changes to all the
users whose access to emails changes and also changes the code to
send event on changing delivery_email to users who have access
to email.
2023-02-10 17:35:49 -08:00
..
actions users: Always pass "delivery_email" field in user objects. 2023-02-10 17:35:49 -08:00
data_import black: Reformat with Black 23. 2023-02-02 10:40:13 -08:00
integration_fixtures/nagios
lib users: Always pass "delivery_email" field in user objects. 2023-02-10 17:35:49 -08:00
management ruff: Fix PIE810 Call `startswith` once with a `tuple`. 2023-02-08 16:40:35 -08:00
migrations realm: Add time limit setting for moving messages between streams. 2023-02-08 12:46:05 -08:00
openapi users: Always pass "delivery_email" field in user objects. 2023-02-10 17:35:49 -08:00
tests users: Always pass "delivery_email" field in user objects. 2023-02-10 17:35:49 -08:00
tornado black: Reformat with Black 23. 2023-02-02 10:40:13 -08:00
views lint: Fix import sort order. 2023-02-10 15:47:32 -08:00
webhooks ruff: Fix PIE810 Call `startswith` once with a `tuple`. 2023-02-08 16:40:35 -08:00
worker deferred_work: Log at start of the work. 2023-02-09 12:06:38 -08:00
__init__.py
apps.py sentry: Initialize sentry in AppConfig ready hook. 2022-09-26 12:42:36 -07:00
context_processors.py ruff: Fix RSE102 Unnecessary parentheses on raised exception. 2023-02-04 16:34:55 -08:00
decorator.py ruff: Fix RSE102 Unnecessary parentheses on raised exception. 2023-02-04 16:34:55 -08:00
filters.py typing: Fix function signatures. 2021-08-20 05:54:19 -07:00
forms.py ruff: Fix SIM105 Use `contextlib.suppress` instead of try-except-pass. 2023-01-23 11:18:36 -08:00
logging_handlers.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
middleware.py ruff: Fix PIE810 Call `startswith` once with a `tuple`. 2023-02-08 16:40:35 -08:00
models.py realm: Add time limit setting for moving messages between streams. 2023-02-08 12:46:05 -08:00
signals.py requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00