edit_history: Stop writing prev_subject to the database.

Now that we have code to support reading prev_topic, this is no longer
necessary.

We'll want to deploy this change to production before running the
migration to remove prev_subject from edit history entries, so that
prev_subject can be fully purged from the database.
This commit is contained in:
Tim Abbott
2022-03-01 17:25:25 -08:00
parent 5e819cdebc
commit a3a9adbfa9
2 changed files with 2 additions and 13 deletions

View File

@@ -6874,7 +6874,6 @@ def do_update_message(
event[ORIG_TOPIC] = orig_topic_name
event[TOPIC_NAME] = topic_name
event[TOPIC_LINKS] = topic_links(target_message.sender.realm_id, topic_name)
edit_history_event["prev_subject"] = orig_topic_name
edit_history_event["prev_topic"] = orig_topic_name
edit_history_event["topic"] = topic_name
@@ -6891,8 +6890,6 @@ def do_update_message(
"timestamp": edit_history_event["timestamp"],
}
if topic_name is not None:
# For backwards-compatability, we include this legacy field name.
topic_only_edit_history_event["prev_subject"] = edit_history_event["prev_subject"]
topic_only_edit_history_event["prev_topic"] = edit_history_event["prev_topic"]
topic_only_edit_history_event["topic"] = edit_history_event["topic"]
if new_stream is not None: