add webfinger to poco, if present

This commit is contained in:
friendica 2011-12-18 00:14:34 -08:00
commit 978717a247
3 changed files with 9 additions and 3 deletions

View file

@ -125,8 +125,10 @@ function poco_init(&$a) {
$entry['id'] = $rr['id'];
if($fields_ret['displayName'])
$entry['displayName'] = $rr['name'];
if($fields_ret['urls'])
if($fields_ret['urls']) {
$entry['urls'] = array(array('value' => $rr['url'], 'type' => 'profile'));
if($rr['addr'] && ($rr['network'] !== NETWORK_MAIL)
$entry['urls'][] = array('value' => 'acct:' . $rr['addr'], 'type' => 'webfinger');
if($fields_ret['preferredUsername'])
$entry['preferredUsername'] = $rr['nick'];
if($fields_ret['photos'])