mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
Use '[deleted]' instead of failing if you edit a message to empty.
Trac #1571 (imported from commit a51602d72aa2b89ce451946ae7f5a5363a6421f4)
This commit is contained in:
@@ -990,8 +990,8 @@ def do_update_message(user_profile, message_id, subject, content):
|
||||
first_rendered_content = old_edit_history_event['prev_rendered_content']
|
||||
|
||||
if content is not None:
|
||||
if content == "":
|
||||
raise JsonableError("Message can't be empty")
|
||||
if len(content.strip()) == 0:
|
||||
content = "[deleted]"
|
||||
if len(content) > MAX_MESSAGE_LENGTH:
|
||||
raise JsonableError("Message too long")
|
||||
rendered_content = message.render_markdown(content)
|
||||
|
||||
Reference in New Issue
Block a user