From 509052cc6195dcda833474ae9d12273ce9c0757e Mon Sep 17 00:00:00 2001 From: borissedw Date: Mon, 14 Aug 2023 18:57:53 +0300 Subject: [PATCH] 0.0.137 --- static/js/chat_sockets.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/chat_sockets.js b/static/js/chat_sockets.js index b2a1fbe..40e4e5b 100644 --- a/static/js/chat_sockets.js +++ b/static/js/chat_sockets.js @@ -64,6 +64,7 @@ chatSocket.onmessage = function (e) { let data = JSON.parse(e.data); console.log('Data:', data); console.log("return") + let msg_cont = document.querySelector(".container-messages") if (data.type === 'chat') { document.querySelector(".container-messages").innerHTML = data.html; document.querySelector(".enter-message-inp").focus() @@ -74,7 +75,7 @@ chatSocket.onmessage = function (e) { if (data.chat_html){ if (msg_cont !== null){ if (msg_cont.dataset['curReceiver'] === ""){ - + document.querySelector(".fotter-chat") msg_cont.innerHTML = data.chat_html } else { // что бы не выводился левый чат @@ -101,6 +102,10 @@ chatSocket.onmessage = function (e) { } } + } else if (data.type === "update_support_chat"){ + if (msg_cont.dataset['curReceiver'] === ""){ + document.querySelector(".info_profile").innerHTML = data.support_chat_html + } } if (data.unread_msgs_count > 0){ let list_unrd = document.querySelectorAll(".qs")