mirror of
https://github.com/friendica/friendica
synced 2024-11-19 03:43:40 +00:00
get media-rss thumbnail if available and nothing else was found (e.g. github).
This commit is contained in:
parent
46c37fc779
commit
1a18f4bcde
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue