From e49df24360b9febcbf97e3837e6351454a075a67 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Mon, 23 Mar 2026 12:41:50 +1300 Subject: [PATCH] ensure network_id is converted to hex in interface stats api response --- meshchat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meshchat.py b/meshchat.py index a7a7b32..68ab43a 100644 --- a/meshchat.py +++ b/meshchat.py @@ -1725,6 +1725,10 @@ class ReticulumMeshChat: if "transport_id" in interface_stats: interface_stats["transport_id"] = interface_stats["transport_id"].hex() + # ensure network_id is hex as json_response can't serialize bytes + if "network_id" in interface_stats: + interface_stats["network_id"] = interface_stats["network_id"].hex() + # ensure probe_responder is hex as json_response can't serialize bytes if "probe_responder" in interface_stats and interface_stats["probe_responder"] is not None: interface_stats["probe_responder"] = interface_stats["probe_responder"].hex()