From: Michael Date: Wed, 18 Apr 2018 05:02:59 +0000 (+0000) Subject: Issue 4655: Avoid multiplicated contact requests from the same account X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8a730b2d85ea14daf08f56b1df010f7592838849;p=friendica.git Issue 4655: Avoid multiplicated contact requests from the same account --- 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`)