|
|
@ -49,7 +49,10 @@ class OnlineUserConsumer(WebsocketConsumer):
|
|
|
|
customer_connections = []
|
|
|
|
customer_connections = []
|
|
|
|
staff_connections = []
|
|
|
|
staff_connections = []
|
|
|
|
for connection in sorted_connections:
|
|
|
|
for connection in sorted_connections:
|
|
|
|
print(connection)
|
|
|
|
if hasattr(connection.user, 'customerprofile'):
|
|
|
|
|
|
|
|
customer_connections.append(connection)
|
|
|
|
|
|
|
|
elif hasattr(connection.user, 'staffprofile'):
|
|
|
|
|
|
|
|
staff_connections.append(connection)
|
|
|
|
event = {
|
|
|
|
event = {
|
|
|
|
'type': 'online_user_connection_handler',
|
|
|
|
'type': 'online_user_connection_handler',
|
|
|
|
'staff_connections': staff_connections,
|
|
|
|
'staff_connections': staff_connections,
|
|
|
|