From 31ca098de5749f7e66fa68519b8983a48ce7cbd1 Mon Sep 17 00:00:00 2001 From: SMLunchen Date: Fri, 29 May 2026 23:12:42 +0200 Subject: [PATCH] fix: don't overwrite Node.channel from MAP_REPORT_APP if already set (#147) NODEINFO_APP is the better / authoritative source for a nodes primary channel. MAP_REPORT_APP packets can arrive on a different MQTT uplink channel and are unconditionally overwriting the channel set by NODEINFO, causing nodes to appear on the wrong channel in the map and channel filters. now MAP_REPORT_APP only sets Node.channel when it is not (yetw) known, making it a fallback rather than an override. --- meshview/mqtt_store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meshview/mqtt_store.py b/meshview/mqtt_store.py index 9e25404..825de1f 100644 --- a/meshview/mqtt_store.py +++ b/meshview/mqtt_store.py @@ -109,7 +109,8 @@ async def process_envelope(topic, env): node.short_name = map_report.short_name node.hw_model = hw_model node.role = role - node.channel = env.channel_id + if not node.channel: + node.channel = env.channel_id node.last_lat = map_report.latitude_i node.last_long = map_report.longitude_i node.firmware = map_report.firmware_version