[PATCH 2/3] reply: add user-agent field
Felipe Contreras
felipe.contreras at gmail.com
Thu Dec 9 14:32:51 PST 2010
Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
---
notmuch-reply.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/notmuch-reply.c b/notmuch-reply.c
index 53a12c5..fc5dac4 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -447,7 +447,7 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
notmuch_message_t *message;
const char *subject, *from_addr = NULL;
const char *in_reply_to, *orig_references, *references;
- const char *message_id;
+ const char *message_id, *user_agent;
char *simple_from;
for (messages = notmuch_query_search_messages (query);
@@ -500,6 +500,11 @@ notmuch_reply_format_default(void *ctx, notmuch_config_t *config, notmuch_query_
g_mime_object_set_header (GMIME_OBJECT (reply),
"References", references);
+ user_agent = talloc_asprintf (ctx, "notmuch %s",
+ STRINGIFY(NOTMUCH_VERSION));
+ g_mime_object_set_header (GMIME_OBJECT (reply),
+ "User-Agent", user_agent);
+
message_id = talloc_asprintf (ctx, "<%lu-notmuch-%s>",
time(NULL),
simple_from);
--
1.7.3.2
More information about the notmuch
mailing list