Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Ben Meadors 2025-07-07 10:50:18 -05:00 committed by GitHub
parent 30d150e3aa
commit 6b262aa448
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -872,7 +872,13 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
case .nodeinfoApp:
if !invalidVersion { upsertNodeInfoPacket(packet: decodedInfo.packet, context: context) }
case .routingApp:
if !invalidVersion { routingPacket(packet: decodedInfo.packet, connectedNodeNum: self.connectedPeripheral?.num ?? 0, context: context) }
if !invalidVersion {
guard let connectedPeripheral = self.connectedPeripheral else {
Logger.mesh.error("🕸️ connectedPeripheral is nil. Unable to determine connectedNodeNum for routingPacket.")
return
}
routingPacket(packet: decodedInfo.packet, connectedNodeNum: connectedPeripheral.num, context: context)
}
case .adminApp:
adminAppPacket(packet: decodedInfo.packet, context: context)
case .replyApp: