diff --git a/static/js/muting.js b/static/js/muting.js index eeaf4a9e65..5b0d48e288 100644 --- a/static/js/muting.js +++ b/static/js/muting.js @@ -3,17 +3,11 @@ import {FoldDict} from "./fold_dict"; import {page_params} from "./page_params"; import * as stream_data from "./stream_data"; import * as timerender from "./timerender"; +import {get_time_from_date_muted} from "./util"; const muted_topics = new Map(); const muted_users = new Map(); -function get_time_from_date_muted(date_muted) { - if (date_muted === undefined) { - return Date.now(); - } - return date_muted * 1000; -} - export function add_muted_topic(stream_id, topic, date_muted) { let sub_dict = muted_topics.get(stream_id); if (!sub_dict) { diff --git a/static/js/util.js b/static/js/util.js index 01f06d158a..57c02f6e2d 100644 --- a/static/js/util.js +++ b/static/js/util.js @@ -354,3 +354,10 @@ export function filter_by_word_prefix_match(items, search_term, item_to_text) { return filtered_items; } + +export function get_time_from_date_muted(date_muted) { + if (date_muted === undefined) { + return Date.now(); + } + return date_muted * 1000; +}