mis-attributed profile photo when Mastodon comment author has no profile photo
This commit is contained in:
parent
1aedf22228
commit
c352047228
@ -1040,6 +1040,11 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
|
|||||||
$datarray['comment_policy'] = 'none';
|
$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']))
|
if((! x($author,'author_name')) || ($author['author_is_feed']))
|
||||||
$author['author_name'] = $contact['xchan_name'];
|
$author['author_name'] = $contact['xchan_name'];
|
||||||
if((! x($author,'author_link')) || ($author['author_is_feed']))
|
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';
|
$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(is_array($contact)) {
|
||||||
if((! x($author,'author_name')) || ($author['author_is_feed']))
|
if((! x($author,'author_name')) || ($author['author_is_feed']))
|
||||||
$author['author_name'] = $contact['xchan_name'];
|
$author['author_name'] = $contact['xchan_name'];
|
||||||
|
Reference in New Issue
Block a user