mirror of https://github.com/zulip/zulip.git
06dd6f8254
Removes the initial check in `_internal_prep_message` of the length of the message content because the `check_message` in the try block will call `normalize_body` on the message content string, which does a more robust check of the message content (empty string, null bytes, length). If the message content length exceeds the value of `settings.MAX_MESSAGE_LENGTH`, then it is truncated based on that value. Updates associated backend test for these changes. The removed length check would truncate the message content with a hard coded value instead of using the value for `settings.MAX_MESSAGE_LENGTH`. Also, removes an extraneous comment about removing null bytes. If there are null bytes in the message content, then `normalize_body` will raise an error. Note that the previous check had intentionally reduced any message over the 10000 character limit to 3900 characters, with the code in question dating to 2012's |
||
---|---|---|
.. | ||
__init__.py | ||
alert_words.py | ||
bots.py | ||
create_realm.py | ||
create_user.py | ||
custom_profile_fields.py | ||
default_streams.py | ||
hotspots.py | ||
invites.py | ||
message_delete.py | ||
message_edit.py | ||
message_flags.py | ||
message_send.py | ||
muted_users.py | ||
presence.py | ||
reactions.py | ||
realm_domains.py | ||
realm_emoji.py | ||
realm_export.py | ||
realm_icon.py | ||
realm_linkifiers.py | ||
realm_logo.py | ||
realm_playgrounds.py | ||
realm_settings.py | ||
streams.py | ||
submessage.py | ||
typing.py | ||
uploads.py | ||
user_activity.py | ||
user_groups.py | ||
user_settings.py | ||
user_status.py | ||
user_topics.py | ||
users.py | ||
video_calls.py |