message: add calendar flag

For message that contain calendar invitations
This commit is contained in:
Dirk-Jan C. Binnema
2022-06-10 00:11:04 +03:00
parent 646a672ae0
commit 39dcd08fbe
4 changed files with 253 additions and 5 deletions

View File

@ -412,6 +412,10 @@ process_part(const MimeObject& parent, const MimePart& part,
return;
if (looks_like_attachment(parent, part, *ctype))
// flag as calendar, if not already
if (none_of(info.flags & Flags::Calendar) &&
ctype->is_type("text", "calendar"))
info.flags |= Flags::Calendar;
info.flags |= Flags::HasAttachment;
// if there are text parts, gather.