aboutsummaryrefslogtreecommitdiffstats
path: root/include/Scrape.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-23 01:20:26 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-23 01:20:26 -0700
commitb8b227b32882fb511c8481a41c53637e7ce7707a (patch)
tree9116351081efa6547268a62332dc4385b1422fbd /include/Scrape.php
parentd850badf2b5717afe39a5fd96dabd29aa013910a (diff)
downloadvolse-hubzilla-b8b227b32882fb511c8481a41c53637e7ce7707a.tar.gz
volse-hubzilla-b8b227b32882fb511c8481a41c53637e7ce7707a.tar.bz2
volse-hubzilla-b8b227b32882fb511c8481a41c53637e7ce7707a.zip
add nicknames to contact records (going forward and retroactive)
Diffstat (limited to 'include/Scrape.php')
-rw-r--r--include/Scrape.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/Scrape.php b/include/Scrape.php
index b4a5dd849..0272dde12 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -33,6 +33,11 @@ function scrape_dfrn($url) {
$x = $item->getAttribute('rel');
if(substr($x,0,5) == "dfrn-")
$ret[$x] = $item->getAttribute('href');
+ if($x === 'lrdd') {
+ $decoded = urldecode($item->getAttribute('href'));
+ if(preg_match('/acct:([^@]*)@/',$decoded,$matches))
+ $ret['nick'] = $matches[1];
+ }
}
// Pull out hCard profile elements