From d5f19051b23a33ff0091e7ce79943752fb16ee90 Mon Sep 17 00:00:00 2001 From: Winston Lowe Date: Thu, 26 Mar 2026 20:37:28 -0700 Subject: [PATCH] Ignore contacts with self public key in contact handling --- lib/connector/meshcore_connector.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index c783716..de50a11 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -3766,6 +3766,14 @@ class MeshCoreConnector extends ChangeNotifier { void _handleContact(Uint8List frame, {bool isContact = true}) { final contactTmp = Contact.fromFrame(frame); if (contactTmp != null) { + if (listEquals(contactTmp.publicKey, _selfPublicKey)) { + appLogger.info( + 'Ignoring contact with self public key: ${contactTmp.name}', + tag: 'Connector', + ); + removeContact(contactTmp); + return; + } final contact = getFromDiscovered(contactTmp); _handleDiscovery(contact, frame, noNotify: true, addActive: true);