Mail: When importing from mail, prefer attachement filename when available

Fixes missing extensions in link name
This commit is contained in:
nathan 2023-07-18 14:21:42 -06:00
parent b548de666d
commit 5023e8944a

View File

@ -357,9 +357,9 @@ class mail_integration {
foreach($mailcontent['attachments'] as $key => $attachment)
{
$data_attachments[$key] = array(
'name' => $mailcontent['attachments'][$key]['name'],
'type' => $mailcontent['attachments'][$key]['type'],
'size' => $mailcontent['attachments'][$key]['size'],
'name' => $attachment['filename'] ?? $mailcontent['attachments'][$key]['name'],
'type' => $mailcontent['attachments'][$key]['type'],
'size' => $mailcontent['attachments'][$key]['size'],
'tmp_name' => $mailcontent['attachments'][$key]['tmp_name']
);
if ($uid && !$mailcontent['attachments'][$key]['add_raw'])