aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-10-14 17:25:20 -0700
committerCarl Worth <cworth@cworth.org>2009-10-14 17:25:20 -0700
commita5865d057498f929cf3af5768e3cdac745bb046d (patch)
tree45905b05c3b73f0ca7e429e9b5892362a9f450c8
parent914df660c423c078df20390a4b647edbe8fb712a (diff)
Add support for message-part mime parts.
We could (and probably should) reparse and index all the headers from the embedded message, but I'm not choosing to do that now---I'm just indexing the body of the embedded message.
-rw-r--r--notmuch-index-message.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/notmuch-index-message.cc b/notmuch-index-message.cc
index 5c73825b..a3483b93 100644
--- a/notmuch-index-message.cc
+++ b/notmuch-index-message.cc
@@ -475,7 +475,17 @@ gen_terms_part (Xapian::TermGenerator term_gen,
return;
}
- if (! GMIME_IS_PART (part)) {
+ if (GMIME_IS_MESSAGE_PART (part)) {
+ GMimeMessage *message;
+
+ message = g_mime_message_part_get_message (GMIME_MESSAGE_PART (part));
+
+ gen_terms_part (term_gen, g_mime_message_get_mime_part (message));
+
+ return;
+ }
+
+ if (! (GMIME_IS_PART (part))) {
fprintf (stderr, "Warning: Not indexing unknown mime part: %s.\n",
g_type_name (G_OBJECT_TYPE (part)));
return;