mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +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
|
// ICS attachment.
|
||||||
// let ics = msg.attachments.find(attachment => 'application/ics' == attachment.mimeType);
|
// attachments is a ko.observableArray, so it must be
|
||||||
|
// unwrapped before array methods are used on it.
|
||||||
let ics = msg.attachments.find(attachment => 'text/calendar' == attachment.mimeType);
|
// 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) {
|
if (ics && ics.download) {
|
||||||
|
|
||||||
// fetch it and parse the VEVENT
|
// fetch it and parse the VEVENT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue