Update Meshtastic/Helpers/BLEManager.swift

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

View file

@ -812,7 +812,9 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
moduleConfig(config: decodedInfo.moduleConfig, context: context, nodeNum: Int64(truncatingIfNeeded: self.connectedPeripheral?.num ?? 0), nodeLongName: self.connectedPeripheral?.longName ?? "Unknown")
if decodedInfo.moduleConfig.payloadVariant == ModuleConfig.OneOf_PayloadVariant.cannedMessage(decodedInfo.moduleConfig.cannedMessage) {
if decodedInfo.moduleConfig.cannedMessage.enabled {
_ = self.getCannedMessageModuleMessages(destNum: self.connectedPeripheral?.num ?? 0, wantResponse: true)
if let validNum = self.connectedPeripheral?.num, validNum > 0 {
_ = self.getCannedMessageModuleMessages(destNum: validNum, wantResponse: true)
}
}
}
}