mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Merge 8a2d8e86a5 into c154d23cfe
This commit is contained in:
commit
696254845c
1 changed files with 11 additions and 4 deletions
|
|
@ -86,10 +86,17 @@
|
|||
});
|
||||
}
|
||||
});
|
||||
// ICS attachment
|
||||
// let ics = msg.attachments.find(attachment => 'application/ics' == attachment.mimeType);
|
||||
|
||||
let ics = msg.attachments.find(attachment => 'text/calendar' == attachment.mimeType);
|
||||
// ICS attachment.
|
||||
// attachments is a ko.observableArray, so it must be
|
||||
// unwrapped before array methods are used on it.
|
||||
// A scheduling mail does not always carry a text/calendar
|
||||
// attachment either: the part is often inline inside
|
||||
// multipart/alternative and repeated as application/ics.
|
||||
let ics = (msg.attachments() || []).find(attachment =>
|
||||
'text/calendar' == attachment.mimeType
|
||||
|| 'application/ics' == attachment.mimeType
|
||||
|| 'text/x-vcalendar' == attachment.mimeType
|
||||
|| /\.ics$/i.test(attachment.fileName || ''));
|
||||
if (ics && ics.download) {
|
||||
|
||||
// fetch it and parse the VEVENT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue