ITADN

Bug: Gateway node (sender) not extracted from MQTT messages, causing "UNK" throughout UI

#427ClosedSimmerV 创建于 2026-04-10
bug
S
SimmerVcommented
The `sender` field on ingested messages — which identifies the gateway node that uplinked a packet to MQTT — was never being populated for protobuf-decoded messages. **Root cause:** When parsing protobuf MQTT messages, meshinfo decodes the `ServiceEnvelope` to access the inner `MeshPacket`, but discards `ServiceEnvelope.gateway_id` — the field that identifies which node published the packet to the MQTT broker. For JSON-decoded messages, the gateway is encoded in the MQTT topic suffix (e.g., `msh/US/2/json/LongFast/!67ea9400`) but was also not extracted. Since `sender` was always empty/null: - Chat messages show "via: UNK" and "null" in route displays - Node `gateway` field is never set from incoming packets - The `sender_node_id` column in `chat_messages` is NULL for all historical rows **Fix:** Extract `gateway_id` from `ServiceEnvelope` for protobuf messages and parse the topic suffix for JSON messages, storing the result as `msg['sender']` before it reaches the individual message handlers.
关闭于 2026-04-11 0 条评论