Mark messages as read when beginning a reply.

(imported from commit 9743e044dbb7570edcb341ca726369a673fc3db9)
This commit is contained in:
Steve Howell
2013-07-08 16:18:06 -04:00
parent 09249ffa3b
commit 01d96ee7fb

View File

@@ -204,6 +204,12 @@ function get_private_message_recipient(message, attr) {
return recipient; 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) { function respond_to_message(opts) {
var message, msg_type; var message, msg_type;
// Before initiating a reply to a message, if there's an // Before initiating a reply to a message, if there's an
@@ -216,6 +222,8 @@ function respond_to_message(opts) {
return; return;
} }
mark_message_as_read(message);
var stream = ''; var stream = '';
var subject = ''; var subject = '';
if (message.type === "stream") { if (message.type === "stream") {