Ignore contacts with self public key in contact handling

This commit is contained in:
Winston Lowe 2026-03-26 20:37:28 -07:00
parent ed12f1b058
commit d5f19051b2

View file

@ -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);