Accept active token from node
All checks were successful
release-image / release-image (push) Successful in 2m8s
All checks were successful
release-image / release-image (push) Successful in 2m8s
This commit is contained in:
@@ -42,7 +42,8 @@ async def websocket_server_handler(websocket):
|
||||
if handshake_data.get("type") == "handshake" and "id" in handshake_data:
|
||||
client_id = handshake_data["id"]
|
||||
client_nickname = handshake_data.get("nickname")
|
||||
await register_client(websocket, client_id, client_nickname)
|
||||
client_active_token = handshake_data.get("active_token")
|
||||
await register_client(websocket, client_id, client_nickname, client_active_token)
|
||||
if not app.active_clients[client_id].access_token:
|
||||
abort(500, "Error retrieving access token")
|
||||
await websocket.send(json.dumps({"type": "handshake_ack", "status": "success", "access_token": app.active_clients[client_id].access_token}))
|
||||
|
||||
Reference in New Issue
Block a user