stuff to make connecting to diaspora profiles easier
This commit is contained in:
parent
5034d7333e
commit
7e33c1072a
3 changed files with 21 additions and 7 deletions
|
@ -11,7 +11,7 @@ function follow_post(&$a) {
|
|||
}
|
||||
|
||||
$url = $orig_url = notags(trim($_POST['url']));
|
||||
|
||||
$diaspora = false;
|
||||
$email_conversant = false;
|
||||
|
||||
if($url) {
|
||||
|
@ -28,6 +28,9 @@ function follow_post(&$a) {
|
|||
$hcard = unamp($link['@attributes']['href']);
|
||||
if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page')
|
||||
$profile = unamp($link['@attributes']['href']);
|
||||
if($link['@attributes']['rel'] === 'http://joindiaspora.com/seed_location')
|
||||
$diaspora = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -90,9 +93,12 @@ function follow_post(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
if(! $profile)
|
||||
$profile = $url;
|
||||
|
||||
if(! $profile) {
|
||||
if($diaspora)
|
||||
$profile = $hcard;
|
||||
else
|
||||
$profile = $url;
|
||||
}
|
||||
|
||||
if(! x($vcard,'fn'))
|
||||
if(x($vcard,'nick'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue