Commit bae06922 authored by JC Brand's avatar JC Brand

fixup

parent 7df2d36e
......@@ -8,6 +8,7 @@
[jcbrand]
- New non-core plugin `converse-roomslist`, which shows a list of open rooms
in the `Rooms` tab of the control box. [jcbrand]
- Show unread messages for minimized chat rooms. [jcbrand]
- New configuration setting for `converse-bookmarks`:
[hide_open_bookmarks](https://conversejs.org/docs/html/configurations.html#hide-open-bookmarks)
It is meant to be set to `true` when using `converse-roomslist` so that open
......
......@@ -121,5 +121,27 @@
}).c('inactive', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree());
expect(_converse.minimized_chats.toggleview.$('.unread-message-count').text()).toBe((i).toString());
}));
it("shows the number messages received to minimized groupchats", mock.initConverse(function (_converse) {
var room_jid = 'kitchen@conference.shakespeare.lit';
test_utils.openAndEnterChatRoom(
_converse, 'kitchen', 'conference.shakespeare.lit', 'fires');
var view = _converse.chatboxviews.get(room_jid);
view.model.set({'minimized': true});
var contact_jid = mock.cur_names[5].replace(/ /g,'.').toLowerCase() + '@localhost';
var message = 'fires: Your attention is required';
var nick = mock.chatroom_names[0],
msg = $msg({
from: room_jid+'/'+nick,
id: (new Date()).getTime(),
to: 'dummy@localhost',
type: 'groupchat'
}).c('body').t(message).tree();
view.handleMUCMessage(msg);
expect(_converse.minimized_chats.toggleview.$('.unread-message-count').is(':visible')).toBeTruthy();
expect(_converse.minimized_chats.toggleview.$('.unread-message-count').text()).toBe('1');
}));
});
}));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment