aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-07 21:00:23 -0700
committerredmatrix <git@macgirvin.com>2016-08-07 21:00:23 -0700
commit07dca9035262115b01c584861fa0e2e687afabee (patch)
treeefa24e0a10ffac903235a7fd8022af17752f9938 /include
parent3338f3c5b2be8c70725d0bc930f716e25ffe50ad (diff)
downloadvolse-hubzilla-07dca9035262115b01c584861fa0e2e687afabee.tar.gz
volse-hubzilla-07dca9035262115b01c584861fa0e2e687afabee.tar.bz2
volse-hubzilla-07dca9035262115b01c584861fa0e2e687afabee.zip
updates to hcard parsing
Diffstat (limited to 'include')
-rw-r--r--include/network.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/network.php b/include/network.php
index 47863b680..fe001b362 100644
--- a/include/network.php
+++ b/include/network.php
@@ -1343,13 +1343,18 @@ function discover_by_webbie($webbie) {
$fullname = $vcard['fn'];
if($vcard['photo'] && (strpos($vcard['photo'],'http') !== 0))
$vcard['photo'] = $diaspora_base . '/' . $vcard['photo'];
- if(($vcard['key']) && (! $pubkey))
- $pubkey = $vcard['key'];
+ if(($vcard['public_key']) && (! $pubkey)) {
+ $diaspora_key = $vcard['public_key'];
+ if(strstr($diaspora_key,'RSA '))
+ $pubkey = rsatopem($diaspora_key);
+ else
+ $pubkey = $diaspora_key;
+ }
if(! $avatar)
$avatar = $vcard['photo'];
if($diaspora) {
- if(($vcard['guid']) && (! $diaspora_guid))
- $diaspora_guid = $vcard['guid'];
+ if(($vcard['uid']) && (! $diaspora_guid))
+ $diaspora_guid = $vcard['uid'];
if(($vcard['url']) && (! $diaspora_base))
$diaspora_base = $vcard['url'];