Cleaned code for contact avatars

This commit is contained in:
Michael 2021-07-06 10:36:00 +00:00
parent 1b6f9e6225
commit 098cd543ea
4 changed files with 13 additions and 34 deletions

View file

@ -325,7 +325,7 @@ function message_content(App $a)
$to_name_e = $message['name'];
$contact = Contact::getByURL($message['from-url'], false, ['thumb', 'addr', 'id', 'avatar']);
$from_photo = Contact::getThumb($contact, $message['from-photo']);
$from_photo = Contact::getThumb($contact);
$mails[] = [
'id' => $message['id'],
@ -457,7 +457,7 @@ function render_messages(array $msg, $t)
}
$contact = Contact::getByURL($rr['url'], false, ['thumb', 'addr', 'id', 'avatar']);
$from_photo = Contact::getThumb($contact, $rr['thumb'] ?: $rr['from-photo']);
$from_photo = Contact::getThumb($contact);
$rslt .= Renderer::replaceMacros($tpl, [
'$id' => $rr['id'],