diff --git a/static/js/hash_util.js b/static/js/hash_util.js index d7960cc63a..4d2a628fd3 100644 --- a/static/js/hash_util.js +++ b/static/js/hash_util.js @@ -59,7 +59,7 @@ exports.by_stream_uri = function (stream) { return "#narrow/stream/" + exports.encode_stream_name(stream); }; -exports.by_stream_subject_uri = function (stream, subject) { +exports.by_stream_topic_uri = function (stream, subject) { return "#narrow/stream/" + exports.encode_stream_name(stream) + "/subject/" + exports.encodeHashComponent(subject); }; @@ -115,7 +115,7 @@ exports.by_conversation_and_time_uri = function (message) { if (message.type === "stream") { return absolute_url + - exports.by_stream_subject_uri(message.stream, message.subject) + + exports.by_stream_topic_uri(message.stream, message.subject) + suffix; } diff --git a/static/js/message_list_view.js b/static/js/message_list_view.js index 247354750a..faef83bdee 100644 --- a/static/js/message_list_view.js +++ b/static/js/message_list_view.js @@ -237,7 +237,7 @@ MessageListView.prototype = { message_container.stream_url = hash_util.by_stream_uri(message_container.msg.stream); message_container.topic_url = - hash_util.by_stream_subject_uri( + hash_util.by_stream_topic_uri( message_container.msg.stream, message_container.msg.subject); } else { diff --git a/static/js/topic_list.js b/static/js/topic_list.js index 688f3ba288..6e61bcd73c 100644 --- a/static/js/topic_list.js +++ b/static/js/topic_list.js @@ -87,7 +87,7 @@ exports.widget = function (parent_elem, my_stream_id) { unread: num_unread, is_zero: num_unread === 0, is_muted: muting.is_topic_muted(my_stream_name, topic_name), - url: hash_util.by_stream_subject_uri(my_stream_name, topic_name), + url: hash_util.by_stream_topic_uri(my_stream_name, topic_name), }; var li = $(templates.render('topic_list_item', topic_info)); self.topic_items.set(topic_name, li);