]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-show.c
show: include Reply-To header in json output
[notmuch] / notmuch-show.c
index 355629348c5977bd5665c1a8ff76cbe7ddc1ef28..f758f56b1587d4e7626b74e5159af5e55c9ca9ce 100644 (file)
@@ -210,6 +210,7 @@ format_headers_json (sprinter_t *sp, GMimeMessage *message,
 {
     InternetAddressList *recipients;
     const char *recipients_string;
+    const char *reply_to_string;
 
     sp->begin_map (sp);
 
@@ -233,6 +234,19 @@ format_headers_json (sprinter_t *sp, GMimeMessage *message,
        sp->string (sp, recipients_string);
     }
 
+    recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_BCC);
+    recipients_string = internet_address_list_to_string (recipients, 0);
+    if (recipients_string) {
+       sp->map_key (sp, "Bcc");
+       sp->string (sp, recipients_string);
+    }
+
+    reply_to_string = g_mime_message_get_reply_to (message);
+    if (reply_to_string) {
+       sp->map_key (sp, "Reply-To");
+       sp->string (sp, reply_to_string);
+    }
+
     if (reply) {
        sp->map_key (sp, "In-reply-to");
        sp->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "In-reply-to"));