From efcbdde1a27ed6db5f4cab737c1e0400211bccf4 Mon Sep 17 00:00:00 2001 From: hadi Date: Thu, 27 Apr 2023 12:42:27 +0200 Subject: [PATCH] Fix mail preview failed to fetch text/calendar as attachment for smime signed messages --- mail/inc/class.mail_ui.inc.php | 2 +- mail/js/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index a5eaeaa002..2571345bd8 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -3372,7 +3372,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2); { $smime['msg'] = lang($smime['msg']); $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']); if (!empty($acc_smime) && !empty($smime['addtocontact'])) $push->call('app.mail.smime_certAddToContact', $smime); if (is_array($attachments)) diff --git a/mail/js/app.js b/mail/js/app.js index 70a4666b61..45b049fa1f 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -6058,7 +6058,7 @@ app.classes.mail = AppJS.extend( return true; }; - if (_attachments) + if (_attachments && _attachments.length) { selected = [_attachments[0]['mail_id']]; data = egw.dataGetUIDdata(selected[0]);