From 07dca9035262115b01c584861fa0e2e687afabee Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 7 Aug 2016 21:00:23 -0700 Subject: updates to hcard parsing --- include/network.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/network.php') 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']; -- cgit v1.2.3