missed one avatar and did not remove the no longer used method

This commit is contained in:
ralf 2023-05-10 09:54:03 +02:00
parent 3930c7a917
commit ee053952c9

View File

@ -2342,36 +2342,11 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
} }
// send configured image proxy to client-side // send configured image proxy to client-side
$content['image_proxy'] = self::image_proxy(); $content['image_proxy'] = self::image_proxy();
$contact = self::getContactFromAddress($content['from'][0]); $content['avatar'] = Api\Mail\Avatar::getAvatar($content['from'][0]);
if (!empty($contact))
{
$content['avatar'] = $contact[0]['photo'];
}
$etpl->exec('mail.mail_ui.displayMessage', $content, $sel_options, $readonlys, $preserv, 2); $etpl->exec('mail.mail_ui.displayMessage', $content, $sel_options, $readonlys, $preserv, 2);
} }
/**
* Retrieve contact info from a given address
*
* @param string|null $address
* @return array
*/
static function getContactFromAddress($address)
{
if (empty($address)) return [];
$email = Mail::stripRFC822Addresses([$address]);
return $GLOBALS['egw']->contacts->search(
array('contact_email' => $email[0], 'contact_email_home' => $email[0]),
array('contact_id', 'email', 'email_home', 'n_fn', 'n_given', 'n_family'),
'', '', '', false, 'OR', false
);
}
/** /**
* This is a helper function to trigger Push method * This is a helper function to trigger Push method
* faster than normal 60 sec cycle. * faster than normal 60 sec cycle.