Fixes #1379 No longer an indication of unread messages in MUC

This commit is contained in:
JC Brand 2018-12-16 12:29:43 +01:00
parent d5e89655dc
commit 7ec6a0576e
4 changed files with 10 additions and 1 deletions

View File

@ -8,6 +8,7 @@
- #1374 Can't load embedded chat when changing `view_mode` between page reloads
- #1376 Fixed some alignment issues in the sidebar
- #1378 Message Delivery Receipts were being sent for carbons and own messages
- #1379 MUC unread messages indicator is failing
## 4.0.6 (2018-12-07)

View File

@ -11284,6 +11284,8 @@ body.reset {
text-shadow: 0 1px 0 var(--text-shadow-color);
word-wrap: break-word;
height: 2.5em; }
#conversejs .items-list .list-item.unread-msgs {
font-weight: bold; }
#conversejs .items-list .list-item .list-item-link {
color: var(--list-item-link-color);
margin: auto;

View File

@ -28,6 +28,10 @@
word-wrap: break-word;
height: 2.5em;
&.unread-msgs {
font-weight: bold;
}
.list-item-link {
color: var(--list-item-link-color);
&:hover {

View File

@ -277,6 +277,7 @@
allow_bookmarks: false // Makes testing easier, otherwise we have to mock stanza traffic.
}, async function (done, _converse) {
test_utils.openControlBox();
const room_jid = 'kitchen@conference.shakespeare.lit';
await test_utils.waitUntil(() => !_.isUndefined(_converse.rooms_list_view), 500);
await test_utils.openAndEnterChatRoom(_converse, 'kitchen', 'conference.shakespeare.lit', 'romeo');
@ -292,9 +293,10 @@
type: 'groupchat'
}).c('body').t('foo').tree());
await new Promise((resolve, reject) => view.once('messageInserted', resolve));
// If the user isn't mentioned, the counter doesn't get incremented, but the text of the groupchat is bold
let room_el = _converse.rooms_list_view.el.querySelector(".available-chatroom");
expect(_.includes(room_el.classList, 'unread-msgs'));
expect(_.includes(room_el.classList, 'unread-msgs')).toBeTruthy();
// If the user is mentioned, the counter also gets updated
view.model.onMessage(