aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-09-16 17:59:05 +0300
committerDavid Bremner <david@tethera.net>2017-09-17 20:01:19 -0300
commitf4ac5ecd5c6db78982a0730059061cbe946ca079 (patch)
tree5cc610eeac7cdde33c40f076abdf6c27d09366df /lib
parent55c047ee0b0c9081ead76925ee1adaeb858264dd (diff)
lib: index the content-type of the parts of encrypted messages
This is a logical followup to "lib: index the content type of signature parts", which will make it easier to record the message structure of all messages.
Diffstat (limited to 'lib')
-rw-r--r--lib/index.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/index.cc b/lib/index.cc
index 0beaae62..ceb444df 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -409,7 +409,14 @@ _index_mime_part (notmuch_message_t *message,
}
}
if (GMIME_IS_MULTIPART_ENCRYPTED (multipart)) {
- /* Don't index encrypted parts. */
+ /* Don't index encrypted parts, but index their content type. */
+ _index_content_type (message,
+ g_mime_multipart_get_part (multipart, i));
+ if ((i != GMIME_MULTIPART_ENCRYPTED_VERSION) &&
+ (i != GMIME_MULTIPART_ENCRYPTED_CONTENT)) {
+ _notmuch_database_log (_notmuch_message_database (message),
+ "Warning: Unexpected extra parts of multipart/encrypted.\n");
+ }
continue;
}
_index_mime_part (message,