mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
c8c79abb9e
commit
9f4653ab53
1 changed files with 5 additions and 1 deletions
|
|
@ -1245,7 +1245,11 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
newMessage.toUser?.userNode?.favorite = true
|
||||
do {
|
||||
try context.save()
|
||||
Logger.data.info("💾 Auto favorited node bases on sending a message \(self.connectedPeripheral?.num.toHex() ?? "0", privacy: .public) to \(toUserNum.toHex(), privacy: .public)")
|
||||
if let connectedPeripheral = self.connectedPeripheral {
|
||||
Logger.data.info("💾 Auto favorited node based on sending a message \(connectedPeripheral.num.toHex(), privacy: .public) to \(toUserNum.toHex(), privacy: .public)")
|
||||
} else {
|
||||
Logger.data.warning("⚠️ connectedPeripheral is nil while attempting to log auto-favoriting a node.")
|
||||
}
|
||||
_ = self.setFavoriteNode(node: (newMessage.toUser?.userNode)!, connectedNodeNum: fromUserNum)
|
||||
} catch {
|
||||
context.rollback()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue