0.0.137
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user