Merge pull request #8263 from annando/remote-follow

New page for remote follow requests
This commit is contained in:
Hypolite Petovan 2020-02-09 17:53:13 -05:00 committed by GitHub
commit 2ec3a97393
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 182 additions and 17 deletions

View file

@ -231,6 +231,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
*