diff --git a/src/Model/Contact.php b/src/Model/Contact.php index eeecac1465..48e8be3106 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1482,6 +1482,11 @@ class Contact extends BaseObject } // send email notification to owner? } else { + if (dba::exists('contact', ['nurl' => normalise_link($url), 'uid' => $importer['uid'], 'pending' => true])) { + logger('ignoring duplicated connection request from pending contact ' . $url); + return; + } + // create contact record q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `name`, `nick`, `photo`, `network`, `rel`, `blocked`, `readonly`, `pending`, `writable`)