mis-attributed profile photo when Mastodon comment author has no profile photo

This commit is contained in:
zotlabs 2017-07-16 22:51:36 -07:00
parent 1aedf22228
commit c352047228

View file

@ -1040,6 +1040,11 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
$datarray['comment_policy'] = 'none';
}
// if we have everything but a photo, provide the default profile photo
if($author['author_name'] && $author['author_link'] && (! $author['author_photo']))
$author['author_photo'] = z_root() . '/' . get_default_profile_photo(80);
if((! x($author,'author_name')) || ($author['author_is_feed']))
$author['author_name'] = $contact['xchan_name'];
if((! x($author,'author_link')) || ($author['author_is_feed']))
@ -1244,6 +1249,12 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
$datarray['comment_policy'] = 'none';
}
// if we have everything but a photo, provide the default profile photo
if($author['author_name'] && $author['author_link'] && (! $author['author_photo']))
$author['author_photo'] = z_root() . '/' . get_default_profile_photo(80);
if(is_array($contact)) {
if((! x($author,'author_name')) || ($author['author_is_feed']))
$author['author_name'] = $contact['xchan_name'];