diff --git a/frontend_tests/node_tests/narrow.js b/frontend_tests/node_tests/narrow.js index ac61910f69..7611187be3 100644 --- a/frontend_tests/node_tests/narrow.js +++ b/frontend_tests/node_tests/narrow.js @@ -64,7 +64,7 @@ run_test('uris', () => { var uri = hash_util.pm_with_uri(ray.email); assert.equal(uri, '#narrow/pm-with/22-ray'); - uri = narrow.huddle_with_uri("22,23"); + uri = hash_util.huddle_with_uri("22,23"); assert.equal(uri, '#narrow/pm-with/22,23-group'); uri = narrow.by_sender_uri(ray.email); diff --git a/static/js/activity.js b/static/js/activity.js index bdbfd291fa..8fbfdb1f50 100644 --- a/static/js/activity.js +++ b/static/js/activity.js @@ -276,7 +276,7 @@ exports.update_huddles = function () { return { user_ids_string: huddle, name: exports.full_huddle_name(huddle), - href: narrow.huddle_with_uri(huddle), + href: hash_util.huddle_with_uri(huddle), fraction_present: exports.huddle_fraction_present(huddle), short_name: exports.short_huddle_name(huddle), }; diff --git a/static/js/hash_util.js b/static/js/hash_util.js index 66567730ba..d3941ac790 100644 --- a/static/js/hash_util.js +++ b/static/js/hash_util.js @@ -92,6 +92,14 @@ exports.pm_with_uri = function (reply_to) { ]); }; +exports.huddle_with_uri = function (user_ids_string) { + // This method is convenient for callers + // that have already converted emails to a comma-delimited + // list of user_ids. We should be careful to keep this + // consistent with hash_util.decode_operand. + return "#narrow/pm-with/" + user_ids_string + '-group'; +}; + return exports; }()); diff --git a/static/js/narrow.js b/static/js/narrow.js index 7aa97c6fcb..d23476215d 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -767,14 +767,6 @@ exports.hide_empty_narrow_message = function () { $(".empty_feed_notice").hide(); }; -exports.huddle_with_uri = function (user_ids_string) { - // This method is convenient is convenient for callers - // that have already converted emails to a comma-delimited - // list of user_ids. We should be careful to keep this - // consistent with hash_util.decode_operand. - return "#narrow/pm-with/" + user_ids_string + '-group'; -}; - exports.by_sender_uri = function (reply_to) { return hash_util.operators_to_hash([ {operator: 'sender', operand: reply_to},