mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +00:00
Fetch profile data from different contact tables when we won't or can't probe via network
This commit is contained in:
parent
df0e2c959a
commit
f387d85cdb
2 changed files with 85 additions and 44 deletions
|
@ -89,14 +89,15 @@ class ActivityPub
|
|||
/**
|
||||
* Fetches a profile from the given url into an array that is compatible to Probe::uri
|
||||
*
|
||||
* @param string $url profile url
|
||||
* @param string $url profile url
|
||||
* @param boolean $update Update the profile
|
||||
* @return array
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function probeProfile($url)
|
||||
public static function probeProfile($url, $update = true)
|
||||
{
|
||||
$apcontact = APContact::getByURL($url, true);
|
||||
$apcontact = APContact::getByURL($url, $update);
|
||||
if (empty($apcontact)) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue