pub const CHAT_BODY_LIMIT: usize = _ /* 22_574_400usize */;Expand description
The most one chat message may weigh. A paste over this is refused by name rather than by axum’s own 413, which says nothing a person can act on.
Derived from the attachment rules, because the two used to disagree: the cap was 4 MiB while
MAX_ATTACHMENTS × MAX_PICTURE_BYTES promised 8 × 2 MiB, and base64 inflates a picture by 4/3.
Two 2 MiB pictures are 5.6 MB of data URL, so they were refused with the advice “write it
to a file and send the path” — advice no one can follow with a picture. The text allowance is
MAX_ATTACHED_CHARS on top of the pictures’ own room.