chat v3
This commit is contained in:
SDE
2023-08-13 18:25:54 +03:00
parent 2bf5b18197
commit 2e2b19d5e0
2 changed files with 23 additions and 14 deletions

View File

@@ -89,6 +89,8 @@ def update_chat(data):
context_Dict.update({'cur_receiver': receiver})
required_beep = data['required_beep']
if not ticket:
@@ -120,15 +122,14 @@ def update_chat(data):
})
if sender and receiver:
msgs = get_msgs_for_chat_w_users(sender, receiver)
unreaded_msgs = msgs.filter(status='sended')
if msgs and unreaded_msgs:
context_Dict.update({'messages': msgs})
chat_html = render_to_string(tpl_name, context_Dict)
res_Dict.update({'chat_html': chat_html})
required_beep = True
# unreaded_msgs.update(status='seen')
# if sender and receiver:
msgs = get_msgs_for_chat_w_users(sender, receiver)
# unreaded_msgs = msgs.filter(status='sended')
# if msgs and unreaded_msgs:
context_Dict.update({'messages': msgs})
chat_html = render_to_string(tpl_name, context_Dict)
res_Dict.update({'chat_html': chat_html})
# unreaded_msgs.update(status='seen')