Update Meshtastic/Extensions/CoreData/NodeInfoEntityToNodeInfo.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Ben Meadors 2025-05-13 20:09:30 -05:00 committed by GitHub
parent 01893e07ed
commit bf55f3526d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,7 @@ extension NodeInfoEntity {
userProto.shortName = user.shortName ?? ""
userProto.hwModel = HardwareModel(rawValue: Int(user.hwModelId))!
userProto.isLicensed = user.isLicensed
userProto.role = Config.DeviceConfig.Role(rawValue: Int(user.role))!
userProto.role = Config.DeviceConfig.Role(rawValue: Int(user.role)) ?? .unknown
userProto.publicKey = user.publicKey?.subdata(in: 0..<user.publicKey!.count) ?? Data()
}
var node = NodeInfo()