zulip/analytics
Sahil Batra 0ed5f76063 settings: Add backend code for using user email_address_visibility setting.
This commits update the code to use user-level email_address_visibility
setting instead of realm-level to set or update the value of UserProfile.email
field and to send the emails to clients.

Major changes are -

- UserProfile.email field is set while creating the user according to
RealmUserDefault.email_address_visbility.

- UserProfile.email field is updated according to change in the setting.

- 'email_address_visibility' is added to person objects in user add event
and in avatar change event.

- client_gravatar can be different for different users when computing
avatar_url for messages and user objects since email available to clients
is dependent on user-level setting.

- For bots, email_address_visibility is set to EVERYONE while creating
them irrespective of realm-default value.

- Test changes are basically setting user-level setting instead of realm
setting and modifying the checks accordingly.
2023-02-10 17:35:49 -08:00
..
lib black: Reformat with Black 23. 2023-02-02 10:40:13 -08:00
management ruff: Fix N818 exception name should be named with an Error suffix. 2022-11-17 16:52:00 -08:00
migrations black: Reformat with Black 23. 2023-02-02 10:40:13 -08:00
tests settings: Add backend code for using user email_address_visibility setting. 2023-02-10 17:35:49 -08:00
views black: Reformat with Black 23. 2023-02-02 10:40:13 -08:00
__init__.py
models.py models: Implicitly type model fields with django-stubs. 2022-10-05 16:15:56 -07:00
urls.py analytics: Use user IDs to get user activity summaries. 2021-10-13 15:30:27 -07:00