mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 04:15:12 +00:00
mis-attributed profile photo when Mastodon comment author has no profile photo
This commit is contained in:
parent
1aedf22228
commit
c352047228
1 changed files with 11 additions and 0 deletions
|
@ -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'];
|
||||
|
|
Loading…
Reference in a new issue