Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/Model
diff options
context:
space:
mode:
authorCyrille Bollu <cyr.debian@bollu.be>2021-05-28 15:49:22 +0300
committerCyrille Bollu <cyr.debian@bollu.be>2021-05-28 15:49:22 +0300
commitaa6bbb2e09687674a86801342d78188372ff1a38 (patch)
treece6cb45a665f1caa5f1285df44a20780429e3aff /lib/Model
parent63a6817023a8604ad3fa0950d045e3aa25b40625 (diff)
Adds a fallback when attachment is a text/calendar an no attachment
name can be found Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Diffstat (limited to 'lib/Model')
-rw-r--r--lib/Model/IMAPMessage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Model/IMAPMessage.php b/lib/Model/IMAPMessage.php
index 53890babd..f5d0bde99 100644
--- a/lib/Model/IMAPMessage.php
+++ b/lib/Model/IMAPMessage.php
@@ -440,7 +440,7 @@ class IMAPMessage implements IMessage, JsonSerializable {
$this->attachments[] = [
'id' => $p->getMimeId(),
'messageId' => $this->messageId,
- 'fileName' => $p->getName(),
+ 'fileName' => $p->getName() ?? 'calendar.ics',
'mime' => $p->getType(),
'size' => $p->getBytes(),
'cid' => $p->getContentId(),