|
|
@ -170,22 +170,6 @@ class TicketRoomConsumer(WebsocketConsumer):
|
|
|
|
|
|
|
|
|
|
|
|
def modify_online_user(self):
|
|
|
|
def modify_online_user(self):
|
|
|
|
connections = TicketConnection.objects.filter(ticket=self.ticket, terminated_at__isnull=True)
|
|
|
|
connections = TicketConnection.objects.filter(ticket=self.ticket, terminated_at__isnull=True)
|
|
|
|
event = {
|
|
|
|
|
|
|
|
'type': 'user_connection_handler',
|
|
|
|
|
|
|
|
'user': self.user,
|
|
|
|
|
|
|
|
'connections': connections,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async_to_sync(self.channel_layer.group_send)(
|
|
|
|
|
|
|
|
self.ticket_number, event
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def user_connection_handler(self, event):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
html = render_to_string("details_templates/partials/ticket-online-users.html")
|
|
|
|
|
|
|
|
self.send(text_data=json.dumps({
|
|
|
|
|
|
|
|
'event_type': 'user_status',
|
|
|
|
|
|
|
|
'html': html
|
|
|
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|