diff options
author | redmatrix <git@macgirvin.com> | 2016-08-07 21:00:23 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-08-07 21:00:23 -0700 |
commit | 07dca9035262115b01c584861fa0e2e687afabee (patch) | |
tree | efa24e0a10ffac903235a7fd8022af17752f9938 /include/network.php | |
parent | 3338f3c5b2be8c70725d0bc930f716e25ffe50ad (diff) | |
download | volse-hubzilla-07dca9035262115b01c584861fa0e2e687afabee.tar.gz volse-hubzilla-07dca9035262115b01c584861fa0e2e687afabee.tar.bz2 volse-hubzilla-07dca9035262115b01c584861fa0e2e687afabee.zip |
updates to hcard parsing
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 13 |
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']; |