actions: Split out zerver.actions.message_send.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-04-14 14:50:10 -07:00
parent ec6355389a
commit 975066e3f0
38 changed files with 1755 additions and 1716 deletions

View File

@@ -71,12 +71,12 @@ This section details the ways in which it is different:
`apply_markdown` and `client_gravatar` features in our
[events API docs](https://zulip.com/api/register-queue)).
- Following our standard naming convention, input validation is done
inside the `check_message` function in `zerver/lib/actions.py`, which is responsible for
inside the `check_message` function in `zerver/actions/message_send.py`, which is responsible for
validating the user can send to the recipient,
[rendering the Markdown](markdown.md), etc. --
basically everything that can fail due to bad user input.
- The core `do_send_messages` function (which handles actually sending
the message) in `zerver/lib/actions.py` is one of the most optimized and thus complex parts of
the message) in `zerver/actions/message_send.py` is one of the most optimized and thus complex parts of
the system. But in short, its job is to atomically do a few key
things:
- Store a `Message` row in the database.