Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
community_topic_edit: Increase time limit to 3 days.
Aman Agrawal961d1d0a68d2
diff --git a/docs/overview/changelog.md b/docs/overview/changelog.mdindex 4ce56b2f045..fa6ffd9977f 100644--- a/docs/overview/changelog.md+++ b/docs/overview/changelog.md@@ -27,6 +27,7 @@ in bursts.#### Full feature changelog+- Community topic editing time limit increased to 3 days for members.- Removed HipChat import tool.- Added support for moving topics to private streams.- Added support for subscribing another stream's membership to a stream.diff --git a/frontend_tests/node_tests/message_edit.js b/frontend_tests/node_tests/message_edit.jsindex e4bea2a9e27..f31466ed63a 100644--- a/frontend_tests/node_tests/message_edit.js+++ b/frontend_tests/node_tests/message_edit.js@@ -7,7 +7,7 @@ const {run_test} = require("../zjsunit/test");set_global("document", null);set_global("page_params", {- realm_community_topic_editing_limit_seconds: 86400,+ realm_community_topic_editing_limit_seconds: 259200,});stub_out_jquery();@@ -92,7 +92,7 @@ run_test("get_editability", () => {realm_allow_community_topic_editing: true,realm_allow_message_editing: true,realm_message_content_edit_limit_seconds: 0,- realm_community_topic_editing_limit_seconds: 86400,+ realm_community_topic_editing_limit_seconds: 259200,is_admin: false,});message.timestamp = current_timestamp - 60;diff --git a/templates/zerver/api/changelog.md b/templates/zerver/api/changelog.mdindex ff41e7bd347..f7076351b1d 100644--- a/templates/zerver/api/changelog.md+++ b/templates/zerver/api/changelog.md@@ -10,6 +10,12 @@ below features are supported.## Changes in Zulip 4.0+**Feature level 38**++* [`POST /register`](/api/register-queue): Increased+ `realm_community_topic_editing_limit_seconds` time limit value+ to 259200s (3 days).+**Feature level 37*** Consistently provide `subscribers` in stream data whendiff --git a/templates/zerver/help/community-topic-edits.md b/templates/zerver/help/community-topic-edits.mdindex 7c6473f9b71..b6401c84e7e 100644--- a/templates/zerver/help/community-topic-edits.md+++ b/templates/zerver/help/community-topic-edits.md@@ -4,7 +4,9 @@By default, anyone can edit any message topic. This is useful because itallows the community to keep conversations organized, even if some members-are still learning how to use topics effectively.+are still learning how to use topics effectively. Note that non-admin members+cannot edit topic of a message after 3 days even if community topic editing+is enabled.Organization administrators can turn off community topic editing. Note thatusers may still be able to edit the topic of messages with **(no topic)**; seediff --git a/zerver/models.py b/zerver/models.pyindex 18cdf375afb..14768a4c911 100644--- a/zerver/models.py+++ b/zerver/models.py@@ -321,7 +321,7 @@ class Realm(models.Model):# Whether users have access to message edit historyallow_edit_history: bool = models.BooleanField(default=True)- DEFAULT_COMMUNITY_TOPIC_EDITING_LIMIT_SECONDS = 86400+ DEFAULT_COMMUNITY_TOPIC_EDITING_LIMIT_SECONDS = 259200allow_community_topic_editing: bool = models.BooleanField(default=True)# Defaults for new usersdiff --git a/zerver/tests/test_message_edit.py b/zerver/tests/test_message_edit.pyindex 999c54cc867..b4eb3ca9ddf 100644--- a/zerver/tests/test_message_edit.py+++ b/zerver/tests/test_message_edit.py@@ -633,8 +633,8 @@ class EditMessageTest(ZulipTestCase):self.login('cordelia')do_edit_message_assert_error(id_, 'D', "Your organization has turned off message editing")- # non-admin users cannot edit topics sent > 24 hrs ago- message.date_sent = message.date_sent - datetime.timedelta(seconds=90000)+ # non-admin users cannot edit topics sent > 72 hrs ago+ message.date_sent = message.date_sent - datetime.timedelta(seconds=290000)message.save()self.login('iago')set_message_editing_params(True, 0, True)