Merge pull request #671 from 72A12F4E/fix-mqtt-data-inconsistency

Fix MQTT data inconsistency
This commit is contained in:
Garth Vander Houwen 2024-06-05 22:47:20 -07:00 committed by GitHub
commit aa5338cafe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {