X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-reply.c;h=46bab4344f7464f57f603040c13608e1a14459a9;hp=62ec176f7ea966c040a0d05c7e1ea9057f4a5a0c;hb=38dacf009c4feb5d4820bbdd9222d7e7be067903;hpb=582f255aeba3998428fa489dc22c735bd0b88143 diff --git a/notmuch-reply.c b/notmuch-reply.c index 62ec176f..46bab434 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -28,7 +28,7 @@ static void show_reply_headers (GMimeStream *stream, GMimeMessage *message) { /* Output RFC 2822 formatted (and RFC 2047 encoded) headers. */ - if (g_mime_object_write_to_stream (GMIME_OBJECT(message), stream) < 0) { + if (g_mime_object_write_to_stream (GMIME_OBJECT(message), NULL, stream) < 0) { INTERNAL_ERROR("failed to write headers to stdout\n"); } } @@ -541,7 +541,7 @@ create_reply_message(void *ctx, in_reply_to = talloc_asprintf (ctx, "<%s>", notmuch_message_get_message_id (message)); - g_mime_object_set_header (GMIME_OBJECT (reply), "In-Reply-To", in_reply_to); + g_mime_object_set_header (GMIME_OBJECT (reply), "In-Reply-To", in_reply_to, NULL); orig_references = notmuch_message_get_header (message, "references"); if (orig_references && *orig_references) @@ -550,7 +550,7 @@ create_reply_message(void *ctx, else references = talloc_strdup (ctx, in_reply_to); - g_mime_object_set_header (GMIME_OBJECT (reply), "References", references); + g_mime_object_set_header (GMIME_OBJECT (reply), "References", references, NULL); from_addr = add_recipients_from_message (reply, config, mime_message, reply_all); @@ -589,13 +589,13 @@ create_reply_message(void *ctx, from_addr = talloc_asprintf (ctx, "%s <%s>", notmuch_config_get_user_name (config), from_addr); - g_mime_object_set_header (GMIME_OBJECT (reply), "From", from_addr); + g_mime_object_set_header (GMIME_OBJECT (reply), "From", from_addr, NULL); - subject = notmuch_message_get_header (message, "subject"); + subject = g_mime_message_get_subject (mime_message); if (subject) { if (strncasecmp (subject, "Re:", 3)) subject = talloc_asprintf (ctx, "Re: %s", subject); - g_mime_message_set_subject (reply, subject); + g_mime_message_set_subject (reply, subject, NULL); } return reply; @@ -663,7 +663,9 @@ static int do_reply(notmuch_config_t *config, /* The headers of the reply message we've created */ sp->map_key (sp, "reply-headers"); - format_headers_sprinter (sp, reply, true); + /* FIXME: send msg_crypto here to avoid killing the + * subject line on reply to encrypted messages! */ + format_headers_sprinter (sp, reply, true, NULL); /* Start the original */ sp->map_key (sp, "original");