mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Unwrap first canned messages element
This commit is contained in:
parent
98bc11cf57
commit
5cf8a63108
2 changed files with 3 additions and 3 deletions
|
|
@ -517,11 +517,11 @@ func adminAppPacket (packet: MeshPacket, context: NSManagedObjectContext) {
|
|||
.replacingOccurrences(of: "11: ", with: "")
|
||||
.replacingOccurrences(of: "\"", with: "")
|
||||
.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
.components(separatedBy: "\n")[0]
|
||||
.components(separatedBy: "\n").first ?? ""
|
||||
fetchedNode[0].cannedMessageConfig?.messages = messages
|
||||
do {
|
||||
try context.save()
|
||||
Logger.data.info("💾 Updated Canned Messages Messages For: \(fetchedNode[0].num.toHex(), privacy: .public)")
|
||||
Logger.data.info("💾 Updated Canned Messages Messages For: \(fetchedNode.first?.num.toHex() ?? "Unknown".localized), privacy: .public)")
|
||||
} catch {
|
||||
context.rollback()
|
||||
let nsError = error as NSError
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 27fac39141d99fe727a0a1824c5397409b1aea75
|
||||
Subproject commit 816595c8bbdfc3b4388e11348ccd043294d58705
|
||||
Loading…
Add table
Add a link
Reference in a new issue