diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-16 22:51:36 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-07-16 22:51:36 -0700 |
commit | c352047228126ab439ca4582995f83f119188588 (patch) | |
tree | e4b7a8b6ab4f32006081ba328482ba3b1b12e7b7 /include/feedutils.php | |
parent | 1aedf22228cf888468619c85901d0e29c571c60a (diff) | |
download | volse-hubzilla-c352047228126ab439ca4582995f83f119188588.tar.gz volse-hubzilla-c352047228126ab439ca4582995f83f119188588.tar.bz2 volse-hubzilla-c352047228126ab439ca4582995f83f119188588.zip |
mis-attributed profile photo when Mastodon comment author has no profile photo
Diffstat (limited to 'include/feedutils.php')
-rw-r--r-- | include/feedutils.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/feedutils.php b/include/feedutils.php index 6ee53e2f6..be7c926d4 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -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']; |