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.

narrow: Rename by_recipient to narrow_by_recipient.

Aman Agrawal69cd263312b2
diff --git a/web/src/click_handlers.js b/web/src/click_handlers.js
index b1733b7c77e..1f8ab7e9122 100644
--- a/web/src/click_handlers.js
+++ b/web/src/click_handlers.js
@@ -474,7 +474,7 @@ export function initialize() {
}
e.preventDefault();
const row_id = get_row_id_for_narrowing(this);
- narrow.by_recipient(row_id, {trigger: "message header"});
+ narrow.narrow_by_recipient(row_id, {trigger: "message header"});
});
$("#message_feed_container").on("click", ".narrows_by_topic", function (e) {
diff --git a/web/src/desktop_integration.js b/web/src/desktop_integration.js
index 033e921f12e..fcc881c1dc2 100644
--- a/web/src/desktop_integration.js
+++ b/web/src/desktop_integration.js
@@ -49,7 +49,7 @@ export function initialize() {
if (message.type === "stream") {
narrow.by_topic(message_id, {trigger: "desktop_notification_reply"});
} else {
- narrow.by_recipient(message_id, {trigger: "desktop_notification_reply"});
+ narrow.narrow_by_recipient(message_id, {trigger: "desktop_notification_reply"});
}
}
diff --git a/web/src/hotkey.js b/web/src/hotkey.js
index 3cb3af94114..a643e1a9508 100644
--- a/web/src/hotkey.js
+++ b/web/src/hotkey.js
@@ -1091,7 +1091,7 @@ export function process_hotkey(e, hotkey) {
case "toggle_conversation_view":
if (narrow_state.narrowed_by_topic_reply()) {
// narrow to stream if user is in topic view
- return do_narrow_action(narrow.by_recipient);
+ return do_narrow_action(narrow.narrow_by_recipient);
} else if (narrow_state.narrowed_by_pm_reply()) {
// do nothing if user is in DM view
return false;
diff --git a/web/src/narrow.js b/web/src/narrow.js
index 8745e70a196..f561c31ac06 100644
--- a/web/src/narrow.js
+++ b/web/src/narrow.js
@@ -1003,7 +1003,7 @@ export function by_topic(target_id, opts) {
if (original.type !== "stream") {
// Only stream messages have topics, but the
// user wants us to narrow in some way.
- by_recipient(target_id, opts);
+ narrow_by_recipient(target_id, opts);
return;
}
@@ -1027,7 +1027,7 @@ export function by_topic(target_id, opts) {
activate(search_terms, opts);
}
-export function by_recipient(target_id, opts) {
+export function narrow_by_recipient(target_id, opts) {
opts = {then_select_id: target_id, ...opts};
// don't use message_lists.current as it won't work for muted messages or for out-of-narrow links
const message = message_store.get(target_id);
diff --git a/web/tests/hotkey.test.js b/web/tests/hotkey.test.js
index c5b583947f1..c3bc98bb7aa 100644
--- a/web/tests/hotkey.test.js
+++ b/web/tests/hotkey.test.js
@@ -381,7 +381,7 @@ run_test("misc", ({override}) => {
assert_mapping("e", message_edit, "start");
override(narrow_state, "narrowed_by_topic_reply", () => true);
- assert_mapping("s", narrow, "by_recipient");
+ assert_mapping("s", narrow, "narrow_by_recipient");
override(narrow_state, "narrowed_by_topic_reply", () => false);
override(narrow_state, "narrowed_by_pm_reply", () => true);