diff --git a/zerver/views/messages.py b/zerver/views/messages.py index 160e9767c2..2716d02bfe 100644 --- a/zerver/views/messages.py +++ b/zerver/views/messages.py @@ -798,10 +798,11 @@ def update_message_backend(request, user_profile, propagate_mode=REQ(default="change_one"), content=REQ(default=None)): # type: (HttpRequest, UserProfile, int, Optional[text_type], Optional[str], Optional[text_type]) -> HttpResponse - if subject is None and content is None: - return json_error(_("Nothing to change")) if not user_profile.realm.allow_message_editing: return json_error(_("Your organization has turned off message editing.")) + + if subject is None and content is None: + return json_error(_("Nothing to change")) if subject is not None: subject = subject.strip() if subject == "": @@ -810,6 +811,7 @@ def update_message_backend(request, user_profile, content = content.strip() if content == "": raise JsonableError(_("Content can't be empty")) + do_update_message(user_profile, message_id, subject, propagate_mode, content) return json_success()