New page for remote follow requests

This commit is contained in:
Michael 2020-02-09 17:04:35 +00:00
parent 16acf1db95
commit 2eebeeaa32
7 changed files with 167 additions and 17 deletions

View file

@ -220,6 +220,28 @@ class Probe
return $profile_link;
}
/**
* Get the link for the remote follow page for a given profile link
*
* @param sting $profile
* @return string Remote follow page link
*/
public static function getRemoteFollowLink(string $profile)
{
$follow_link = '';
$links = self::lrdd($profile);
if (!empty($links) && is_array($links)) {
foreach ($links as $link) {
if ($link['@attributes']['rel'] === ActivityNamespace::OSTATUSSUB) {
$follow_link = $link['@attributes']['template'];
}
}
}
return $follow_link;
}
/**
* Check an URI for LRDD data
*