diff --git a/frontend_tests/node_tests/muting.js b/frontend_tests/node_tests/muting.js index 3263c3af9a..c2307637b5 100644 --- a/frontend_tests/node_tests/muting.js +++ b/frontend_tests/node_tests/muting.js @@ -44,7 +44,7 @@ stream_data.add_sub(social); function test(label, f) { run_test(label, ({override}) => { - user_topics.set_muted_topics([]); + user_topics.set_user_topics([]); muted_users.set_muted_users([]); f({override}); }); @@ -189,7 +189,7 @@ test("unknown streams", () => { test("set_user_topics", () => { blueslip.expect("warn", "Unknown stream ID in set_user_topic: 999"); - user_topics.set_muted_topics([]); + user_topics.set_user_topics([]); assert.ok(!user_topics.is_topic_muted(social.stream_id, "breakfast")); assert.ok(!user_topics.is_topic_muted(design.stream_id, "typography")); @@ -243,9 +243,9 @@ test("set_user_topics", () => { }); test("case_insensitivity", () => { - user_topics.set_muted_topics([]); + user_topics.set_user_topics([]); assert.ok(!user_topics.is_topic_muted(social.stream_id, "breakfast")); - user_topics.set_muted_topics([ + user_topics.set_user_topics([ { stream_id: social.stream_id, topic_name: "breakfast", diff --git a/frontend_tests/node_tests/pm_conversations.js b/frontend_tests/node_tests/pm_conversations.js index 773b536715..bbe4df1a2e 100644 --- a/frontend_tests/node_tests/pm_conversations.js +++ b/frontend_tests/node_tests/pm_conversations.js @@ -23,7 +23,7 @@ const params = { function test(label, f) { run_test(label, ({override}) => { pmc.clear_for_testing(); - user_topics.set_muted_topics([]); + user_topics.set_user_topics([]); muted_users.set_muted_users([]); people.initialize_current_user(15); f({override}); diff --git a/frontend_tests/node_tests/unread.js b/frontend_tests/node_tests/unread.js index 5d5110bb33..f793805d9f 100644 --- a/frontend_tests/node_tests/unread.js +++ b/frontend_tests/node_tests/unread.js @@ -57,7 +57,7 @@ function test_notifiable_count(home_unread_messages, expected_notifiable_count) function test(label, f) { run_test(label, (helpers) => { unread.declare_bankruptcy(); - user_topics.set_muted_topics([]); + user_topics.set_user_topics([]); f(helpers); }); } diff --git a/static/js/user_topics.js b/static/js/user_topics.js index e5bf09a4bf..06e4deae5f 100644 --- a/static/js/user_topics.js +++ b/static/js/user_topics.js @@ -80,7 +80,7 @@ export function set_user_topic(user_topic) { } } -export function set_muted_topics(user_topics) { +export function set_user_topics(user_topics) { muted_topics.clear(); for (const user_topic of user_topics) { @@ -89,5 +89,5 @@ export function set_muted_topics(user_topics) { } export function initialize() { - set_muted_topics(page_params.user_topics); + set_user_topics(page_params.user_topics); }