diff --git a/server.py b/server.py index 28e077c..25876cb 100644 --- a/server.py +++ b/server.py @@ -49,14 +49,19 @@ async def handler(ws: websockets.WebSocketServerProtocol): logging.warning("Target %s not found", target) elif mtype == "labels": - logging.info(f"Got labels from {peer_id}: {msg['labels']}") labels = msg.get("labels") + peer_id = msg.get("id") + freqs = msg.get("freqs") + transitions = msg.get("transitions") + logging.info(f"Got labels from {peer_id}: {msg['labels']}") if peer_id and isinstance(labels, list): payload = json.dumps({ "type": "broadcast_labels", "from": peer_id, - "labels": labels + "labels": labels, + "freqs": freqs, + "transitions": transitions }) # send to all except the originator