diff options
author | Friendika <info@friendika.com> | 2011-05-19 17:25:41 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-05-19 17:25:41 -0700 |
commit | 44d5c90af446537ddd292caff0cd85370a7339ab (patch) | |
tree | 263060ed73c7a9830e3b63e95782eca02a17a38d /include/Scrape.php | |
parent | f151565029162c1de258eaef7fc8aacd4f69ba47 (diff) | |
download | volse-hubzilla-44d5c90af446537ddd292caff0cd85370a7339ab.tar.gz volse-hubzilla-44d5c90af446537ddd292caff0cd85370a7339ab.tar.bz2 volse-hubzilla-44d5c90af446537ddd292caff0cd85370a7339ab.zip |
better mailing list support, email addr can be either 'from' or 'to'
Diffstat (limited to 'include/Scrape.php')
-rw-r--r-- | include/Scrape.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/Scrape.php b/include/Scrape.php index a6bb5f728..21e6bd01f 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -278,6 +278,7 @@ function probe_url($url) { $links = lrdd($url); if(count($links)) { + logger('probe_url: found lrdd links: ' . print_r($links,true), LOGGER_DATA); foreach($links as $link) { if($link['@attributes']['rel'] === NAMESPACE_DFRN) $dfrn = unamp($link['@attributes']['href']); @@ -345,8 +346,11 @@ function probe_url($url) { $poll = 'email ' . random_string(); $priority = 0; $x = email_msg_meta($mbox,$msgs[0]); - $adr = imap_rfc822_parse_adrlist($x->from,''); - if(strlen($adr[0]->personal)) + if(stristr($x->from,$orig_url)) + $adr = imap_rfc822_parse_adrlist($x->from,''); + elseif(stristr($x->to,$orig_url)) + $adr = imap_rfc822_parse_adrlist($x->to,''); + if(isset($adr) && strlen($adr[0]->personal)) $vcard['fn'] = notags($adr[0]->personal); } imap_close($mbox); |