0.2.20
chat v2
This commit is contained in:
@@ -86,12 +86,18 @@ def update_chat_ajax(request):
|
|||||||
|
|
||||||
tickets_list_html = render_to_string(
|
tickets_list_html = render_to_string(
|
||||||
'blocks/profile/b_list_of_tickets_support_chat.html', context_Dict, request=request)
|
'blocks/profile/b_list_of_tickets_support_chat.html', context_Dict, request=request)
|
||||||
res_Dict.update({'tickets_list_html': tickets_list_html})
|
res_Dict.update({
|
||||||
|
'tickets_list_html': tickets_list_html,
|
||||||
|
'msgs_count': len(msgs)
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
|
|
||||||
# получаем правую панель с получателями
|
# получаем правую панель с получателями
|
||||||
receivers, unread_msgs_count = get_chat_receivers_for_user(request.user, receiver)
|
receivers, unread_msgs_count = get_chat_receivers_for_user(request.user, receiver)
|
||||||
if unread_msgs_count:
|
saved_unread_msgs_count = request.user.user_profile.get_node_by_name('receivers_unread_msgs_count')
|
||||||
|
if not saved_unread_msgs_count or saved_unread_msgs_count != unread_msgs_count:
|
||||||
|
request.user.user_profile.add_node_to_json_data({'receivers_unread_msgs_count': unread_msgs_count}, save=True)
|
||||||
|
# if unread_msgs_count:
|
||||||
required_beep = True
|
required_beep = True
|
||||||
|
|
||||||
context_Dict.update({'receivers': receivers})
|
context_Dict.update({'receivers': receivers})
|
||||||
|
|||||||
Reference in New Issue
Block a user