message: improve attachment heuristics
Do not consider calender-invitations "attachments"; do mark as "calendar". Do recognize application/ics as calendar messages. Update mime-object to expose a message part's disposition. Change the "is-attachment" heuristic to include inline parts if they have a filename parameter in their content-disposition. Note that this doesn't change things radically; the delta is +69 and -202 for ~6500 attachments.
This commit is contained in:
@ -814,8 +814,7 @@ RU5EOlZFVkVOVA0KRU5EOlZDQUxFTkRBUg0K
|
||||
g_assert_true(!!message);
|
||||
assert_equal(message->subject(),
|
||||
"Invitation: HELLO, @ Thu 9 Jan 2014 08:30 - 09:30 (william@example.com)");
|
||||
g_assert_true(message->flags() == (Flags::Passed|Flags::Seen|
|
||||
Flags::HasAttachment|Flags::Calendar));
|
||||
g_assert_true(message->flags() == (Flags::Passed|Flags::Seen|Flags::Calendar));
|
||||
g_assert_cmpuint(message->body_html().value_or("").find("DETAILS"), ==, 2271);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user