mirror of
https://github.com/friendica/friendica
synced 2024-11-10 08:22:57 +00:00
Merge pull request #4858 from annando/issue-4655
Issue 4655: Avoid multiplicated contact requests from the same account
This commit is contained in:
commit
596b934a02
1 changed files with 5 additions and 0 deletions
|
@ -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`)
|
||||
|
|
Loading…
Reference in a new issue