From d972ba5ef52b58cf392447aa27988d46a9d7102f Mon Sep 17 00:00:00 2001 From: Blake McAnally Date: Thu, 6 Jun 2024 00:35:55 -0500 Subject: [PATCH] Ensure that viaMqtt is set when creating a new node info entity --- Meshtastic/Helpers/MeshPackets.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Meshtastic/Helpers/MeshPackets.swift b/Meshtastic/Helpers/MeshPackets.swift index 3250334b..18748059 100644 --- a/Meshtastic/Helpers/MeshPackets.swift +++ b/Meshtastic/Helpers/MeshPackets.swift @@ -272,6 +272,7 @@ func nodeInfoPacket (nodeInfo: NodeInfo, channel: UInt32, context: NSManagedObje newNode.channel = Int32(nodeInfo.channel) newNode.favorite = nodeInfo.isFavorite newNode.hopsAway = Int32(nodeInfo.hopsAway) + newNode.viaMqtt = nodeInfo.viaMqtt if nodeInfo.hasDeviceMetrics { let telemetry = TelemetryEntity(context: context) @@ -350,6 +351,7 @@ func nodeInfoPacket (nodeInfo: NodeInfo, channel: UInt32, context: NSManagedObje fetchedNode[0].channel = Int32(nodeInfo.channel) fetchedNode[0].favorite = nodeInfo.isFavorite fetchedNode[0].hopsAway = Int32(nodeInfo.hopsAway) + fetchedNode[0].viaMqtt = nodeInfo.viaMqtt if nodeInfo.hasUser { if fetchedNode[0].user == nil {