mirror of
https://github.com/friendica/friendica
synced 2025-04-27 09:10:12 +00:00
Get rid of zombie introductions that reappear automatically
This commit is contained in:
parent
8fa2d67f87
commit
aba23daeca
2 changed files with 11 additions and 4 deletions
|
@ -304,8 +304,11 @@ class CronJobs
|
|||
/// - set contact-id in item when not present
|
||||
|
||||
// Add intro entries for pending contacts
|
||||
// We don't do this for DFRN entries since such revived contact requests seem to mostly fail.
|
||||
$pending_contacts = DBA::p("SELECT `uid`, `id`, `url`, `network`, `created` FROM `contact`
|
||||
WHERE `pending` AND `rel` IN (?, ?) AND NOT EXISTS (SELECT `id` FROM `intro` WHERE `contact-id` = `contact`.`id`)", 0, Contact::FOLLOWER);
|
||||
WHERE `pending` AND `rel` IN (?, ?) AND `network` != ?
|
||||
AND NOT EXISTS (SELECT `id` FROM `intro` WHERE `contact-id` = `contact`.`id`)",
|
||||
0, Contact::FOLLOWER, Protocol::DFRN);
|
||||
while ($contact = DBA::fetch($pending_contacts)) {
|
||||
DBA::insert('intro', ['uid' => $contact['uid'], 'contact-id' => $contact['id'], 'blocked' => false,
|
||||
'hash' => Strings::getRandomHex(), 'datetime' => $contact['created']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue