This commit is contained in:
2023-08-13 20:06:18 +03:00
parent 56bc23375d
commit 42a5452fc5
2 changed files with 14 additions and 1 deletions

View File

@@ -88,6 +88,13 @@ chatSocket.onmessage = function (e) {
}
}
if (data.unread_msgs_count > 0){
let list_unrd = document.querySelectorAll(".unredmessages_value_text")
let i = 0
for (i;i < list_unrd.length;i++){
list_unrd[i].innerHTML = data.unread_msgs_count.toString()
}
}
if (data.required_beep === true) {
const beep = new Audio('/static/sounds/beep_2.mp3')
beep.play()