summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/api/revocation.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/api/revocation.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/api/revocation.py b/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
index bbd1bc2..8f30745 100644
--- a/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
+++ b/packages/meshbay-hub/src/meshbay_hub/api/revocation.py
@@ -119,7 +119,7 @@ async def node_websocket(ws: WebSocket):
await ws.close(code=4001)
return
- node_id = decoded.get("sub", "unknown")
+ node_id = msg.get("node_id") or decoded.get("sub", "unknown")
_connected_nodes[node_id] = ws
log.info("Node WS connected: %s", node_id[:8])
await ws.send_text(json.dumps({"type": "auth_ok", "node_id": node_id}))
@@ -134,6 +134,9 @@ async def node_websocket(ws: WebSocket):
event = _punch_events.get(node_id)
if event:
event.set()
+ elif msg.get("type") == "webrtc_answer":
+ from meshbay_hub.api.signaling import handle_webrtc_answer
+ handle_webrtc_answer(msg)
except WebSocketDisconnect:
log.info("Node WS disconnected: %s", (node_id or "unknown")[:8])