unread: Convert mark_stream_as_read to use stream IDs.

The logic is simpler and more robust.
This commit is contained in:
Tim Abbott
2017-08-15 10:34:15 -07:00
parent 89f9017686
commit f3a41ac796
4 changed files with 11 additions and 15 deletions

View File

@@ -118,11 +118,11 @@ exports.mark_current_list_as_read = function mark_current_list_as_read(options)
exports.mark_messages_as_read(current_msg_list.all_messages(), options);
};
exports.mark_stream_as_read = function mark_stream_as_read(stream, cont) {
exports.mark_stream_as_read = function mark_stream_as_read(stream_id, cont) {
channel.post({
url: '/json/mark_stream_as_read',
idempotent: true,
data: {stream_name: stream},
data: {stream_id: stream_id},
success: cont});
};