Fix mail preview failed to fetch text/calendar as attachment for smime signed messages

This commit is contained in:
hadi 2023-04-27 12:42:27 +02:00
parent 5ef378abef
commit fd34e597c3
2 changed files with 2 additions and 2 deletions

View File

@ -3372,7 +3372,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
{ {
$smime['msg'] = lang($smime['msg']); $smime['msg'] = lang($smime['msg']);
$acc_smime = Mail\Smime::get_acc_smime($this->mail_bo->profileID); $acc_smime = Mail\Smime::get_acc_smime($this->mail_bo->profileID);
$attachments = $this->mail_bo->getMessageAttachments($uid, $partID, $structure,true,false,true, $mailbox); $attachments = $this->mail_bo->getMessageAttachments($uid, $partID, $structure,true,true,true, $mailbox);
$push = new Api\Json\Push($GLOBALS['egw_info']['user']['account_id']); $push = new Api\Json\Push($GLOBALS['egw_info']['user']['account_id']);
if (!empty($acc_smime) && !empty($smime['addtocontact'])) $push->call('app.mail.smime_certAddToContact', $smime); if (!empty($acc_smime) && !empty($smime['addtocontact'])) $push->call('app.mail.smime_certAddToContact', $smime);
if (is_array($attachments)) if (is_array($attachments))

View File

@ -6058,7 +6058,7 @@ app.classes.mail = AppJS.extend(
return true; return true;
}; };
if (_attachments) if (_attachments && _attachments.length)
{ {
selected = [_attachments[0]['mail_id']]; selected = [_attachments[0]['mail_id']];
data = egw.dataGetUIDdata(selected[0]); data = egw.dataGetUIDdata(selected[0]);