mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:50:17 +00:00
Asynchronous contact relation check
This commit is contained in:
parent
dca1fa06bf
commit
4fbec33af0
3 changed files with 115 additions and 45 deletions
|
@ -2075,7 +2075,7 @@ class Contact
|
|||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function updateFromProbe($id, $network = '', $force = false)
|
||||
public static function updateFromProbe(int $id, string $network = '', bool $force = false)
|
||||
{
|
||||
/*
|
||||
Warning: Never ever fetch the public key via Probe::uri and write it into the contacts.
|
||||
|
@ -2123,6 +2123,10 @@ class Contact
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ContactRelation::isDiscoverable($ret['url'])) {
|
||||
Worker::add(PRIORITY_LOW, 'ContactDiscovery', $ret['url']);
|
||||
}
|
||||
|
||||
if (isset($ret['hide']) && is_bool($ret['hide'])) {
|
||||
$ret['unsearchable'] = $ret['hide'];
|
||||
}
|
||||
|
@ -2147,8 +2151,6 @@ class Contact
|
|||
GContact::updateFromPublicContactID($id);
|
||||
}
|
||||
|
||||
ContactRelation::discoverByUrl($ret['url']);
|
||||
|
||||
$update = false;
|
||||
|
||||
// make sure to not overwrite existing values with blank entries except some technical fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue