diff --git a/amadeus/static/js/socket.js b/amadeus/static/js/socket.js index 5128091..3bb5389 100644 --- a/amadeus/static/js/socket.js +++ b/amadeus/static/js/socket.js @@ -290,6 +290,23 @@ function messageReceived(content) { span.text(actual); } + + if (content.subtype == "subject") { + var subject_cbadge = $("#subject_" + content.space).find('.chat_notify'), + actual = subject_cbadge.text(); + + if (actual != "+99") { + actual = parseInt(actual, 10) + 1; + + if (actual > 99) { + actual = "+99"; + } + + subject_cbadge.text(actual); + } + + subject_cbadge.show(); + } } if (("Notification" in window)) { diff --git a/chat/templates/chat/list.html b/chat/templates/chat/list.html index 6c4a97b..76410f2 100644 --- a/chat/templates/chat/list.html +++ b/chat/templates/chat/list.html @@ -54,6 +54,9 @@ {% include 'chat/_view.html' with space="0" space_type='general' %} {% endfor %} + + {% pagination request paginator page_obj %} + {% else %}