message_edit: Modify the error message for topic edit deadline.

This commit modifies the error message shown when topic edit
deadline is passed to make it more clear that the limit is for
editing message's topic.
This commit is contained in:
sahil839 2021-06-03 21:52:10 +05:30 committed by Tim Abbott
parent f827debe9d
commit e2835d3f4f
2 changed files with 2 additions and 2 deletions

View File

@ -2805,7 +2805,7 @@ def check_update_message(
):
deadline_seconds = Realm.DEFAULT_COMMUNITY_TOPIC_EDITING_LIMIT_SECONDS + edit_limit_buffer
if (timezone_now() - message.date_sent) > datetime.timedelta(seconds=deadline_seconds):
raise JsonableError(_("The time limit for editing this message has passed"))
raise JsonableError(_("The time limit for editing this message's topic has passed"))
rendered_content = None
links_for_embed: Set[str] = set()

View File

@ -879,7 +879,7 @@ class EditMessageTest(EditMessageTestCase):
set_message_editing_params(True, 0, True)
do_edit_message_assert_success(id_, "E")
self.login("cordelia")
do_edit_message_assert_error(id_, "F", "The time limit for editing this message has passed")
do_edit_message_assert_error(id_, "F", "The time limit for editing this message's topic has passed")
# anyone should be able to edit "no topic" indefinitely
message.set_topic_name("(no topic)")