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.

message_view: Use stream id instead of name for activate_stream_for_cycle_hotkey.

evykassirer039037e64f60
diff --git a/web/src/message_view.js b/web/src/message_view.js
index 990aea80eb4..ec7d329dc6d 100644
--- a/web/src/message_view.js
+++ b/web/src/message_view.js
@@ -1065,7 +1065,8 @@ export function render_message_list_with_selected_message(opts) {
narrow_history.save_narrow_state_and_flush();
}
-export function activate_stream_for_cycle_hotkey(stream_name) {
+export function activate_stream_for_cycle_hotkey(stream_id) {
+ const stream_name = stream_data.get_stream_name_from_id(stream_id);
// This is the common code for A/D hotkeys.
const filter_expr = [{operator: "channel", operand: stream_name}];
show(filter_expr, {});
@@ -1084,8 +1085,7 @@ export function stream_cycle_backward() {
return;
}
- const stream_name = stream_data.get_stream_name_from_id(stream_id);
- activate_stream_for_cycle_hotkey(stream_name);
+ activate_stream_for_cycle_hotkey(stream_id);
}
export function stream_cycle_forward() {
@@ -1101,8 +1101,7 @@ export function stream_cycle_forward() {
return;
}
- const stream_name = stream_data.get_stream_name_from_id(stream_id);
- activate_stream_for_cycle_hotkey(stream_name);
+ activate_stream_for_cycle_hotkey(stream_id);
}
export function narrow_to_next_topic(opts = {}) {