Skip to content

Commit

Permalink
Set public key on upsert of existing node
Browse files Browse the repository at this point in the history
  • Loading branch information
garthvh committed Sep 5, 2024
1 parent e294a24 commit 23d62e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Meshtastic/Persistence/UpdateCoreData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ func upsertNodeInfoPacket (packet: MeshPacket, context: NSManagedObjectContext)
fetchedNode[0].user!.role = Int32(nodeInfoMessage.user.role.rawValue)
fetchedNode[0].user!.hwModel = String(describing: nodeInfoMessage.user.hwModel).uppercased()
fetchedNode[0].user!.hwModelId = Int32(nodeInfoMessage.user.hwModel.rawValue)
fetchedNode[0].user!.pkiEncrypted = packet.pkiEncrypted
fetchedNode[0].user!.publicKey = packet.publicKey
Task {
Api().loadDeviceHardwareData { (hw) in
let dh = hw.first(where: { $0.hwModel == fetchedNode[0].user?.hwModelId ?? 0 })
Expand Down

0 comments on commit 23d62e8

Please sign in to comment.