mirror of
https://github.com/friendica/friendica
synced 2025-04-29 21:04:24 +02:00
Issue 11553: Reliably return the user's contacts
This commit is contained in:
parent
82972744a9
commit
e4dda7d2ca
5 changed files with 189 additions and 47 deletions
|
@ -136,6 +136,18 @@ class Contact
|
|||
return $contact;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
* @param array $condition Array of fields for condition
|
||||
* @param array $params Array of several parameters
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function selectAccountToArray(array $fields = [], array $condition = [], array $params = []): array
|
||||
{
|
||||
return DBA::selectToArray('account-user-view', $fields, $condition, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
* @param array $condition Array of fields for condition
|
||||
|
@ -3154,6 +3166,8 @@ class Contact
|
|||
return;
|
||||
}
|
||||
|
||||
Worker::add(Worker::PRIORITY_LOW, 'ContactDiscoveryForUser', $contact['uid']);
|
||||
|
||||
self::clearFollowerFollowingEndpointCache($contact['uid']);
|
||||
|
||||
$cdata = self::getPublicAndUserContactID($contact['id'], $contact['uid']);
|
||||
|
@ -3177,6 +3191,8 @@ class Contact
|
|||
} else {
|
||||
self::update(['rel' => self::FOLLOWER], ['id' => $contact['id']]);
|
||||
}
|
||||
|
||||
Worker::add(Worker::PRIORITY_LOW, 'ContactDiscoveryForUser', $contact['uid']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue