Only send battery nofifications from the local node

This commit is contained in:
Garth Vander Houwen 2024-08-28 08:36:45 -07:00
parent 98512e8cc5
commit a8149e0c66

View file

@ -757,7 +757,7 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
// Connected Device Metrics
// ------------------------
// Low Battery notification
if connectedNode != Int64(packet.from) {
if connectedNode == Int64(packet.from) {
if UserDefaults.lowBatteryNotifications && telemetry.batteryLevel > 0 && telemetry.batteryLevel < 4 {
let manager = LocalNotificationManager()
manager.notifications = [