zulip/zerver/views
Abhijeet Prasad Bodas 152508e346 mute user: Reduce two database fetches when unmuting to one.
Previously, when unmuting a user, we used to make
two database fetches - one to verify that the user
is has been muted before, and one while actually
unmuting the user.

This reduces that to one, by passing around the
`MutedUser` object fetched in the first round.

Since the new function returns `Optional[MutedUser]`,
we need to use a hack for events tests, because
mypy does not yet use the type inferred from
`assert foo is not None` in nested functions like lambdas.
See python/mypy@8780d45507.
2021-04-08 23:04:28 -07:00
..
development request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
__init__.py
alert_words.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
archive.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
attachments.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
auth.py api: Delete ancient fetch_google_client_id endpoint. 2021-04-08 06:10:39 -07:00
camo.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
compatibility.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
custom_profile_fields.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
digest.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
documentation.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
drafts.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
email_mirror.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
events_register.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
home.py giphy: Use GIPHY web SDK to allow inserting GIFs in compose box. 2021-04-05 15:04:49 -07:00
hotspots.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
invite.py invite: Raise same error for all values of invite_to_realm_policy. 2021-04-07 14:51:00 -07:00
message_edit.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
message_fetch.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
message_flags.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
message_send.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
muting.py mute user: Reduce two database fetches when unmuting to one. 2021-04-08 23:04:28 -07:00
portico.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
presence.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
push_notifications.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
reactions.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
realm.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
realm_domains.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
realm_emoji.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
realm_export.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
realm_icon.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
realm_linkifiers.py linkifiers: Use dictionaries for internal structures. 2021-04-05 18:16:08 -07:00
realm_logo.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
realm_playgrounds.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
registration.py api: Delete ancient generate_204 endpoint. 2021-04-08 06:10:39 -07:00
report.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
storage.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
streams.py streams: Raise same error for all values of invite_to_stream_policy. 2021-04-07 14:51:00 -07:00
submessage.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
thumbnail.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
tutorial.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
typing.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
unsubscribe.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
upload.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
user_groups.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
user_settings.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
users.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
video_calls.py request: Rename validator parameter of REQ to json_validator. 2021-04-07 14:13:06 -07:00
zephyr.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00