mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:50:17 +00:00
Merge pull request #8263 from annando/remote-follow
New page for remote follow requests
This commit is contained in:
commit
2ec3a97393
7 changed files with 182 additions and 17 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue