aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorPeter Wang <novalazy@gmail.com>2012-10-30 21:12:46 +1100
committerDavid Bremner <bremner@debian.org>2012-11-07 08:03:45 -0400
commit7d3c06dcbe3f86eb70f08cdb41ae7cf994dcaee7 (patch)
treeb49ebbc98b83205659ec628eb2865788c9040ca0 /notmuch-show.c
parent439fe710ebd2ceadc65f1e80bee545cd1a28bf59 (diff)
show: include Reply-To header in json output
Output the Reply-To header field if present in a message. I want to be able to see what the sender intended in my mail client, before hitting the reply key. Only json output is changed, like the recently added Bcc field.
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index 0b7abf16..f758f56b 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -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);
@@ -240,6 +241,12 @@ format_headers_json (sprinter_t *sp, GMimeMessage *message,
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"));