How can I display unread messages like private chats..
Any new message to group room... didn't show the unread messages like private messages
How can I display unread messages like private chats..
Any new message to group room... didn't show the unread messages like private messages
This problem is marked as a bug in the issue tracker, so perhaps it will be fixed. Below is a workaround I've used using a plugin. What this does is it checks for a group message, and when received, adds a class to the minimized chat box. I added some example css with a style to blink the text in the box.
converse.plugins.add('myplugin', {
initialize: function () {
var c = this._converse;
c.on('message', function (m) {
if (m.stanza.textContent!='' && m.attrs.type == 'groupchat') {
$('.chat-head-chatroom').addClass('alert-room');
}
});
}
});
converse.initialize({
...
whitelisted_plugins: ['myplugin'],
...
CSS Code:
.alert-room {
font-weight: bold !important;
}
.alert-room .restore-chat {
animation: blinker 1s linear infinite;
}
@keyframes blinker {
50% {
opacity: 0.5;
}
}