get media-rss thumbnail if available and nothing else was found (e.g. github).

This commit is contained in:
Friendika 2011-02-02 17:32:25 -08:00
parent 46c37fc779
commit 1a18f4bcde

View File

@ -113,10 +113,16 @@ function follow_post(&$a) {
$vcard['nick'] = trim(substr($vcard['nick'],0,strpos($vcard['nick'],' ')));
$email = $author->get_email();
}
if(! $vcard['photo']) {
$rawmedia = $item->get_item_tags('http://search.yahoo.com/mrss/','thumbnail');
if($rawmedia && $rawmedia[0]['attribs']['']['url'])
$vcard['photo'] = $rawmedia[0]['attribs']['']['url'];
}
}
}
if((! $vcard['photo']) && strlen($email))
$vcard['photo'] = gravatar_img($email);
$network = 'feed';
$priority = 2;
}