mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 05:58:25 +00:00
Allow anyone to edit a "no topic" message
This change would allow anyone in the realm to set a topic for a "no topic" message. As soon as the message topic is set, only the sender can change it again. (imported from commit 0a91a93b8fd14549965cedc79f45ffd869d82307)
This commit is contained in:
@@ -963,7 +963,8 @@ def do_update_message(user_profile, message_id, subject, content):
|
||||
edit_history_event = {}
|
||||
|
||||
if message.sender != user_profile:
|
||||
raise JsonableError("Message was not sent by you")
|
||||
if not (message.subject == "(no topic)" and content is None):
|
||||
raise JsonableError("Message was not sent by you")
|
||||
|
||||
# Set first_rendered_content to be the oldest version of the
|
||||
# rendered content recorded; which is the current version if the
|
||||
|
||||
Reference in New Issue
Block a user