mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Notification links
This commit is contained in:
parent
f02926b43b
commit
8734b149c6
3 changed files with 5 additions and 5 deletions
|
|
@ -712,10 +712,10 @@ func telemetryPacket(packet: MeshPacket, connectedNode: Int64, context: NSManage
|
|||
Notification(
|
||||
id: ("notification.id.\(UUID().uuidString)"),
|
||||
title: "Critically Low Battery!",
|
||||
subtitle: "AKA \(telemetry.nodeTelemetry?.user?.shortName ?? "UNK")",
|
||||
subtitle: "\(telemetry.nodeTelemetry?.user?.longName ?? "unknown".localized)",
|
||||
content: "Time to charge your radio, there is \(telemetry.batteryLevel)% battery remaining.",
|
||||
target: "nodes",
|
||||
path: "meshtastic:///nodes?nodenum=\(telemetry.nodeTelemetry?.num ?? 0)"
|
||||
path: "meshtastic:///nodes?nodenum=\(telemetry.nodeTelemetry?.num ?? 0)&detail=deviceMetricsLog"
|
||||
)
|
||||
]
|
||||
manager.schedule()
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ class MeshtasticAppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificat
|
|||
if let targetValue = userInfo["target"] as? String,
|
||||
let deepLink = userInfo["path"] as? String,
|
||||
let url = URL(string: deepLink) {
|
||||
Logger.services.info("userNotificationCenter didReceiveResponse \(targetValue) \(deepLink)")
|
||||
Logger.services.info("🔔 userNotificationCenter didReceiveResponse \(targetValue) \(deepLink)")
|
||||
router?.route(url: url)
|
||||
} else {
|
||||
Logger.services.error("Failed to handle notification response: \(userInfo)")
|
||||
Logger.services.error("💥 Failed to handle notification response: \(userInfo)")
|
||||
}
|
||||
|
||||
completionHandler()
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ func upsertNodeInfoPacket (packet: MeshPacket, context: NSManagedObjectContext)
|
|||
subtitle: "\(newUser.longName ?? "unknown".localized)",
|
||||
content: "New Node has been discovered",
|
||||
target: "nodes",
|
||||
path: "meshtastic:///nodes?nodenum=\(newUser.num)&detail=nodeMap"
|
||||
path: "meshtastic:///nodes?nodenum=\(newUser.num)"
|
||||
)
|
||||
]
|
||||
manager.schedule()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue