1
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -59,6 +59,8 @@ function wsReceiveData (e) {
|
||||
if (user_id) {
|
||||
if (ticket_maneger.toString() !== user_id) {
|
||||
clear_messenger()
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user