unread: Convert mark_topic_as_read to use stream IDs.

This is safer in its handling of potentially renamed streams.
This commit is contained in:
Tim Abbott
2017-08-15 10:28:32 -07:00
parent f3a41ac796
commit 842bf77efb
4 changed files with 14 additions and 18 deletions

View File

@@ -126,11 +126,11 @@ exports.mark_stream_as_read = function mark_stream_as_read(stream_id, cont) {
success: cont});
};
exports.mark_topic_as_read = function mark_topic_as_read(stream, topic, cont) {
exports.mark_topic_as_read = function mark_topic_as_read(stream_id, topic, cont) {
channel.post({
url: '/json/mark_topic_as_read',
idempotent: true,
data: {stream_name: stream, topic_name: topic},
data: {stream_id: stream_id, topic_name: topic},
success: cont});
};