unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Nazarewicz <mpn@google.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] notmuch-show: include Bcc header in json output
Date: Wed,  5 Sep 2012 23:40:57 +0200	[thread overview]
Message-ID: <e07afdc98fd9517fba3060970b1150cef4d7ac80.1346881123.git.mina86@mina86.com> (raw)

From: Michal Nazarewicz <mina86@mina86.com>

---
 notmuch-show.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

Actually, I don't understand why json does not include all the
headers...

diff --git a/notmuch-show.c b/notmuch-show.c
index 3556293..0b7abf1 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -233,6 +233,13 @@ 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);
+    }
+
     if (reply) {
 	sp->map_key (sp, "In-reply-to");
 	sp->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "In-reply-to"));
-- 
1.7.7.3

             reply	other threads:[~2012-09-05 21:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 21:40 Michal Nazarewicz [this message]
2012-09-06 14:31 ` [PATCH] notmuch-show: include Bcc header in json output Michal Sojka
2012-09-06 15:16 ` Michal Nazarewicz
2012-09-07 11:52   ` Michal Sojka
2012-09-08 11:29 ` Tomi Ollila
2012-09-10  6:35   ` [PATCHv3] " Michal Nazarewicz
2012-09-10  8:52     ` Tomi Ollila
2012-09-10  9:13       ` Michal Nazarewicz
2012-09-10  9:30         ` Tomi Ollila
2012-09-10  9:41           ` Michal Nazarewicz
2012-10-20 15:58     ` Ethan Glasser-Camp
2012-10-22 23:09     ` David Bremner
2012-10-29 16:08       ` [PATCH] Add NEWS information about Bcc header in JSON output Michal Nazarewicz
2012-10-31 21:40         ` David Bremner
2012-11-01 13:51           ` Michal Nazarewicz
2012-11-07 12:09             ` David Bremner
2012-11-07 13:04               ` Tomi Ollila
2012-11-07 14:03                 ` Michal Nazarewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e07afdc98fd9517fba3060970b1150cef4d7ac80.1346881123.git.mina86@mina86.com \
    --to=mpn@google.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).