mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	Add unread.get_msg_ids_for_mentions().
This commit is contained in:
		@@ -458,6 +458,7 @@ stream_data.get_stream_id = function () {
 | 
			
		||||
 | 
			
		||||
    var counts = unread.get_counts();
 | 
			
		||||
    assert.equal(counts.mentioned_message_count, 0);
 | 
			
		||||
    assert.deepEqual(unread.get_msg_ids_for_mentions(), []);
 | 
			
		||||
 | 
			
		||||
    var message = {
 | 
			
		||||
        id: 15,
 | 
			
		||||
@@ -472,6 +473,7 @@ stream_data.get_stream_id = function () {
 | 
			
		||||
 | 
			
		||||
    counts = unread.get_counts();
 | 
			
		||||
    assert.equal(counts.mentioned_message_count, 1);
 | 
			
		||||
    assert.deepEqual(unread.get_msg_ids_for_mentions(), [message.id]);
 | 
			
		||||
    unread.mark_as_read(message.id);
 | 
			
		||||
    counts = unread.get_counts();
 | 
			
		||||
    assert.equal(counts.mentioned_message_count, 0);
 | 
			
		||||
 
 | 
			
		||||
@@ -533,6 +533,12 @@ exports.get_msg_ids_for_private = function () {
 | 
			
		||||
    return exports.unread_pm_counter.get_msg_ids();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.get_msg_ids_for_mentions = function () {
 | 
			
		||||
    var ids = exports.unread_mentions_counter.members();
 | 
			
		||||
 | 
			
		||||
    return util.sorted_ids(ids);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.load_server_counts = function () {
 | 
			
		||||
    var unread_msgs = page_params.unread_msgs;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user