This commit is contained in:
SBD
2024-01-26 16:31:58 +03:00
parent d5453dada6
commit 91751574cc
4 changed files with 5 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ class MsgGroup(BaseModel):
if msg.text:
return msg.text
elif msg.files:
return msg.files[0].file_name
return msg.files[0]['file_name']
return self.name

View File

@@ -69,7 +69,7 @@ function clear_messenger (data) {
let dataset_cont_mes = container_messenger.dataset
if (dataset_cont_mes){
let ticket_id = dataset_cont_mes["ticketId"]
if (ticket_id !== ""){s
if (ticket_id !== ""){
let ticket = document.querySelector(`[data-cur-receiver-item="${ticket_id}"]`)
if (ticket === null){
document.querySelector(".block-chat").style.display = "none"

View File

@@ -59,6 +59,8 @@ function wsReceiveData (e) {
if (user_id) {
if (ticket_maneger.toString() !== user_id) {
clear_messenger()
} else {
}
}
else {

View File

@@ -28,7 +28,7 @@
<script>
{#var user_id = {{ user.id }}#}
ws_url = `wss://{% get_ws_address %}/ws/socket-server/?user_id={{ user.id }}`;
ws_url = `ws://{% get_ws_address %}/ws/socket-server/?user_id={{ user.id }}`;
var chatSocket;
init_ws()
const beep = new Audio('/static/sounds/beep_2.mp3')