emile 11 months ago
parent 265b2b6f9a
commit 433033f564

@ -170,6 +170,22 @@ class TicketRoomConsumer(WebsocketConsumer):
def modify_online_user(self):
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):
context = {
'connections': event['connections'],
'user': event['user']
}
print('hi')

Loading…
Cancel
Save