0.0.169
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
function sendMessageSocket (data) {
|
||||
if (chatSocket.readyState !== 1 || chatSocket.readyState !== 0){
|
||||
if (chatSocket.readyState !== 1 && chatSocket.readyState !== 0){
|
||||
init_ws()
|
||||
}
|
||||
|
||||
@@ -70,7 +70,9 @@ function wsReceiveData (e) {
|
||||
} else {
|
||||
if (data.chat_html){
|
||||
if (msg_cont){
|
||||
msg_cont.innerHTML = data.chat_html
|
||||
if (msg_cont.dataset['curReceiver'] === data['sender'].toString() || msg_cont.dataset['curReceiver'] === data['receiver'].toString()) {
|
||||
msg_cont.innerHTML = data.chat_html
|
||||
}
|
||||
} else {
|
||||
let error_msg_cont = "msg_cont is not defined"
|
||||
console.log(error_msg_cont)
|
||||
@@ -78,7 +80,7 @@ function wsReceiveData (e) {
|
||||
} else if (data.support_chat_html){
|
||||
let cont_mes_ins = document.querySelector(".info_profile")
|
||||
if (cont_mes_ins){
|
||||
cont_mes_ins.innerHTML = data.chat_html
|
||||
cont_mes_ins.innerHTML = data.support_chat_html
|
||||
} else {
|
||||
let error_cont_mes_ins = "cont_mes_ins is not defined"
|
||||
console.log(error_cont_mes_ins)
|
||||
|
||||
Reference in New Issue
Block a user