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.

reload: Remove get_reload_topic.

Zixuan James Li07050394b976
diff --git a/frontend_tests/node_tests/util.js b/frontend_tests/node_tests/util.js
index caf4e715619..56ccf7b1305 100644
--- a/frontend_tests/node_tests/util.js
+++ b/frontend_tests/node_tests/util.js
@@ -27,11 +27,6 @@ run_test("CachedValue", () => {
assert.equal(cv.get(), 12);
});
-run_test("get_reload_topic", () => {
- assert.equal(util.get_reload_topic({subject: "foo"}), "foo");
- assert.equal(util.get_reload_topic({topic: "bar"}), "bar");
-});
-
run_test("extract_pm_recipients", () => {
assert.equal(util.extract_pm_recipients("[email protected], [email protected]").length, 2);
assert.equal(util.extract_pm_recipients("[email protected], ").length, 1);
diff --git a/static/js/reload.js b/static/js/reload.js
index 8274bc33886..50164861459 100644
--- a/static/js/reload.js
+++ b/static/js/reload.js
@@ -176,12 +176,9 @@ export function initialize() {
const send_now = Number.parseInt(vars.send_after_reload, 10);
try {
- // TODO: preserve focus
- const topic = util.get_reload_topic(vars);
-
compose_actions.start(vars.msg_type, {
stream: vars.stream || "",
- topic: topic || "",
+ topic: vars.topic || "",
private_message_recipient: vars.recipient || "",
content: vars.msg || "",
draft_id: vars.draft_id || "",
diff --git a/static/js/util.js b/static/js/util.js
index 35e6430497b..2fd1aa741f4 100644
--- a/static/js/util.js
+++ b/static/js/util.js
@@ -217,13 +217,6 @@ export function get_match_topic(obj) {
return obj.match_subject;
}
-export function get_reload_topic(obj) {
- // When we first upgrade to releases that have
- // topic=foo in the code, the user's reload URL
- // may still have subject=foo from the prior version.
- return obj.topic || obj.subject || "";
-}
-
export function get_edit_event_topic(obj) {
if (obj.topic === undefined) {
return obj.subject;