Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

edit_history: Remove `LEGACY_PREV_TOPIC` constant from code base.

Lauryn Menard58f21fc74820
diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py
index 96454a47b5c..a4a6012a9a4 100644
--- a/tools/linter_lib/custom_check.py
+++ b/tools/linter_lib/custom_check.py
@@ -12,10 +12,7 @@ from zulint.custom_rules import Rule, RuleList
FILES_WITH_LEGACY_SUBJECT = {
# This basically requires a big DB migration:
- "zerver/lib/message.py",
"zerver/lib/topic.py",
- "zerver/lib/types.py",
- "zerver/views/message_edit.py",
# This is for backward compatibility.
"zerver/tests/test_legacy_subject.py",
# Other migration-related changes require extreme care.
@@ -232,7 +229,7 @@ python_rules = RuleList(
rules=[
{
"pattern": "subject|SUBJECT",
- "exclude_pattern": "subject to the|email|outbox|edit_history_event",
+ "exclude_pattern": "subject to the|email|outbox",
"description": "avoid subject as a var",
"good_lines": ["topic_name"],
"bad_lines": ['subject="foo"', " MAX_SUBJECT_LEN"],
diff --git a/zerver/lib/topic.py b/zerver/lib/topic.py
index 0f8e21053a4..544c17cf124 100644
--- a/zerver/lib/topic.py
+++ b/zerver/lib/topic.py
@@ -20,12 +20,6 @@ MATCH_TOPIC = "match_subject"
# Prefix use to mark topic as resolved.
RESOLVED_TOPIC_PREFIX = "✔ "
-# This constant is actually embedded into
-# the JSON data for message edit history,
-# so we'll always need to handle legacy data
-# unless we do a pretty tricky migration.
-LEGACY_PREV_TOPIC = "prev_subject"
-
# This constant is pretty closely coupled to the
# database, but it's the JSON field.
EXPORT_TOPIC_NAME = "subject"