X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmessage.php;h=ef5dce826ec5c62e3d54007ea25802d2ef49cca8;hb=0344d268960b6c246d33ec2e5da897b93b27db72;hp=b5c6c064dc652a8ed37d7714f1e2729860e70e58;hpb=ec89274cd881eef3e49dc8f05a1bc4d50dfcfe25;p=friendica.git diff --git a/mod/message.php b/mod/message.php index b5c6c064dc..ef5dce826e 100644 --- a/mod/message.php +++ b/mod/message.php @@ -484,12 +484,18 @@ function message_content(&$a) { $to_name_e = $message['name']; } + $contact = get_contact_details_by_url($message['from-url']); + if (isset($contact["thumb"])) + $from_photo = $contact["thumb"]; + else + $from_photo = $message['from-photo']; + $mails[] = array( 'id' => $message['id'], 'from_name' => $from_name_e, 'from_url' => $from_url, 'sparkle' => $sparkle, - 'from_photo' => proxy_url($message['from-photo'], false, PROXY_SIZE_THUMB), + 'from_photo' => proxy_url($from_photo, false, PROXY_SIZE_THUMB), 'subject' => $subject_e, 'body' => $body_e, 'delete' => t('Delete message'), @@ -585,12 +591,18 @@ function render_messages($msg, $t) { $to_name_e = $rr['name']; } + $contact = get_contact_details_by_url($rr['url']); + if (isset($contact["thumb"])) + $from_photo = $contact["thumb"]; + else + $from_photo = (($rr['thumb']) ? $rr['thumb'] : $rr['from-photo']); + $rslt .= replace_macros($tpl, array( '$id' => $rr['id'], '$from_name' => $participants, '$from_url' => (($rr['network'] === NETWORK_DFRN) ? 'redir/' . $rr['contact-id'] : $rr['url']), '$sparkle' => ' sparkle', - '$from_photo' => (($rr['thumb']) ? $rr['thumb'] : $rr['from-photo']), + '$from_photo' => proxy_url($from_photo, false, PROXY_SIZE_THUMB), '$subject' => $subject_e, '$delete' => t('Delete conversation'), '$body' => $body_e,