bankruptcy: Clear unread counts for mentions.

This commit is contained in:
Steve Howell
2017-07-31 08:30:46 -04:00
parent bf81782e59
commit 19ebf1e23b
2 changed files with 11 additions and 0 deletions

View File

@@ -404,6 +404,16 @@ stream_data.get_stream_id = function () {
}());
(function test_declare_bankruptcy() {
var message = {
id: 16,
type: 'whatever',
stream_id: 1999,
subject: 'whatever',
mentioned: true,
};
unread.process_loaded_messages([message]);
unread.declare_bankruptcy();
var counts = unread.get_counts();

View File

@@ -218,6 +218,7 @@ exports.process_read_message = function (message) {
exports.declare_bankruptcy = function () {
unread_privates = new Dict();
exports.unread_topic_counter.clear();
unread_mentioned = new Dict();
};
exports.num_unread_current_messages = function () {