Merge pull request #8263 from annando/remote-follow
New page for remote follow requests
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user