Files
zulip/static/js/summary.js
Tim Abbott c8d57fcafb Split out message_flags.js.
(imported from commit 52afa76fa71141630e325e558cb9c6955d8c03d5)
2014-01-31 14:59:03 -05:00

32 lines
741 B
JavaScript

var summary = (function () {
// This module has helper functions for the August 2013 message
// summarizing experiment.
var exports = {};
function mark_summarized(message) {
if (narrow.narrowed_by_reply()) {
// Narrowed to a topic or PM recipient
message_flags.send_summarize_in_stream(message);
}
if (narrow.active() && !narrow.narrowed_to_search()) {
// Narrowed to anything except a search
message_flags.send_summarize_in_home(message);
}
}
exports.maybe_mark_summarized = function (message) {
if (feature_flags.summarize_read_while_narrowed) {
mark_summarized(message);
}
};
return exports;
}());
if (typeof module !== 'undefined') {
module.exports = summary;
}