This commit is contained in:
2023-08-18 13:18:41 +03:00
parent c6a8862b43
commit fcc86d079a
2 changed files with 3 additions and 4 deletions

View File

@@ -7,7 +7,6 @@ function update_count_unread_messages (data) {
}
}
function play_required_beep (data) {
const beep = new Audio('/static/sounds/beep_2.mp3')
function play_required_beep (data,beep) {
beep.play()
}

View File

@@ -15,7 +15,7 @@ function sendMessageSocket (data) {
chatSocket.onmessage = function (e) {
const beep = new Audio('/static/sounds/beep_2.mp3')
let old_item_tab_user_list = inital_old_tab()
let old_item_tab_user = old_item_tab_user_list[0]
let el_tab = old_item_tab_user_list[1]
@@ -51,7 +51,7 @@ chatSocket.onmessage = function (e) {
update_count_unread_messages(data)
}
if (data.required_beep === true) {
play_required_beep(data)
play_required_beep(data,beep)
}
}