mirror of https://github.com/zulip/zulip.git
Use REQ_topic in update_message_backend().
Note that we now strip the topic in the converter. We also strip it in the view handler, which is now redundant, but I left it in as defensive code.
This commit is contained in:
parent
3de1289d3e
commit
c7515a853c
|
@ -1344,12 +1344,10 @@ def get_message_edit_history(request: HttpRequest, user_profile: UserProfile,
|
|||
@has_request_variables
|
||||
def update_message_backend(request: HttpRequest, user_profile: UserMessage,
|
||||
message_id: int=REQ(converter=to_non_negative_int),
|
||||
subject: Optional[str]=REQ(default=None),
|
||||
topic_name: Optional[str]=REQ_topic(),
|
||||
propagate_mode: Optional[str]=REQ(default="change_one"),
|
||||
content: Optional[str]=REQ(default=None)) -> HttpResponse:
|
||||
|
||||
topic_name = subject
|
||||
|
||||
if not user_profile.realm.allow_message_editing:
|
||||
return json_error(_("Your organization has turned off message editing"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue