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.
This commit is contained in:
SMLunchen
2026-05-29 23:12:42 +02:00
committed by GitHub
parent 794502d63f
commit 31ca098de5
+2 -1
View File
@@ -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