mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:10:15 +00:00
Remove contacts in the background
This commit is contained in:
parent
faefafd4f8
commit
29aa90ec09
2 changed files with 8 additions and 12 deletions
|
@ -314,15 +314,10 @@ class Contact extends BaseObject
|
|||
return;
|
||||
}
|
||||
|
||||
$archive = PConfig::get($contact['uid'], 'system', 'archive_removed_contacts');
|
||||
if ($archive) {
|
||||
DBA::update('contact', ['archive' => true, 'network' => 'none', 'writable' => false], ['id' => $id]);
|
||||
return;
|
||||
}
|
||||
// Archive the contact
|
||||
DBA::update('contact', ['archive' => true, 'network' => Protocol::PHANTOM], ['id' => $id]);
|
||||
|
||||
DBA::delete('contact', ['id' => $id]);
|
||||
|
||||
// Delete the rest in the background
|
||||
// Delete it in the background
|
||||
Worker::add(PRIORITY_LOW, 'RemoveContact', $id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue