diff --git a/include/conversation.php b/include/conversation.php index 12c3b2a20d..7752342842 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -141,7 +141,6 @@ function conversation(&$a, $items, $mode, $update) { $nickname = $a->user['nickname']; $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); - $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); $sp = false; $profile_link = best_link_url($item,$sp); @@ -151,6 +150,12 @@ function conversation(&$a, $items, $mode, $update) { $profile_link = ''; + $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); + if(($normalised != 'mailbox') && (x($a->contacts[$normalised]))) + $profile_avatar = $a->contacts[$normalised]['thumb']; + else + $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); + $location = (($item['location']) ? '' . $item['location'] . '' : ''); $coord = (($item['coord']) ? '' . $item['coord'] . '' : ''); if($coord) { @@ -388,7 +393,6 @@ function conversation(&$a, $items, $mode, $update) { $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true); $profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); - $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $thumb); $sp = false; $profile_link = best_link_url($item,$sp); @@ -398,6 +402,15 @@ function conversation(&$a, $items, $mode, $update) { if($profile_link === 'mailbox') $profile_link = ''; + $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); + if(($normalised != 'mailbox') && (x($a->contacts[$normalised]))) + $profile_avatar = $a->contacts[$normalised]['thumb']; + else + $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $thumb); + + + + $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : ''); $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');