From 01d96ee7fb461ad66d3cfa07d1ce016933c9ce51 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Mon, 8 Jul 2013 16:18:06 -0400 Subject: [PATCH] Mark messages as read when beginning a reply. (imported from commit 9743e044dbb7570edcb341ca726369a673fc3db9) --- zephyr/static/js/zephyr.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 2cd752c397..a37e22d46b 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -204,6 +204,12 @@ function get_private_message_recipient(message, attr) { return recipient; } +function mark_message_as_read(message) { + // This seems like a rather pointless wrapper, but + // process_read_messages() should stay as an internal API. + process_read_messages([message]); +} + function respond_to_message(opts) { var message, msg_type; // Before initiating a reply to a message, if there's an @@ -216,6 +222,8 @@ function respond_to_message(opts) { return; } + mark_message_as_read(message); + var stream = ''; var subject = ''; if (message.type === "stream") {