Fetch profile data from different contact tables when we won't or can't probe via network

This commit is contained in:
Michael 2019-04-08 20:41:18 +00:00
parent df0e2c959a
commit f387d85cdb
2 changed files with 85 additions and 44 deletions

View file

@ -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;
}