diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index f796aeed..dc285539 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -592,30 +592,6 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph case .max: print("MAX PORT NUM OF 511") } - - // MARK: Check for an All / Broadcast User - let fetchBCUserRequest: NSFetchRequest = NSFetchRequest.init(entityName: "UserEntity") - fetchBCUserRequest.predicate = NSPredicate(format: "num == %lld", Int64(broadcastNodeNum)) - - do { - let fetchedUser = try context?.fetch(fetchBCUserRequest) as! [UserEntity] - if fetchedUser.isEmpty { - // Save the broadcast user if it does not exist -// let bcu: UserEntity = UserEntity(context: context!) -// bcu.shortName = "ALL" -// bcu.longName = "All - Broadcast" -// bcu.hwModel = "UNSET" -// bcu.num = Int64(broadcastNodeNum) -// bcu.userId = "BROADCASTNODE" -// print("💾 Saved the All - Broadcast User") - } else { - - context!.delete(fetchedUser[0]) - } - - } catch { - MeshLogger.log("💥 Error Saving the All - Broadcast User") - } // MARK: Share Location Position Update Timer // Use context to pass the radio name with the timer diff --git a/Meshtastic/Helpers/MeshPackets.swift b/Meshtastic/Helpers/MeshPackets.swift index 516fd12d..df41ad45 100644 --- a/Meshtastic/Helpers/MeshPackets.swift +++ b/Meshtastic/Helpers/MeshPackets.swift @@ -1277,15 +1277,6 @@ func textMessageAppPacket(packet: MeshPacket, connectedNode: Int64, context: NSM if packet.decoded.replyID > 0 { newMessage.replyID = Int64(packet.decoded.replyID) } - //if packet.to == broadcastNodeNum && fetchedUsers.count == 1 { - // Save the broadcast user if it does not exist -// let bcu: UserEntity = UserEntity(context: context) -// bcu.shortName = "ALL" -// bcu.longName = "All - Broadcast" -// bcu.hwModel = "UNSET" -// bcu.num = Int64(broadcastNodeNum) -// bcu.userId = "BROADCASTNODE" -// newMessage.toUser = bcu if fetchedUsers.first(where: { $0.num == packet.to }) != nil { newMessage.toUser = fetchedUsers.first(where: { $0.num == packet.to })