RE: [Spam-verdenking][english 100%] Re: another bug fix release: 0.15.2, in progress.
[notmuch-archives.git] / 56 / a5561fa7231f46798648f73768a42ad9928a21
1 Return-Path: <jrollins@finestructure.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 16AC5431FBD\r
6         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:17 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id x3k26Sy+AWBF for <notmuch@notmuchmail.org>;\r
16         Sun, 19 Aug 2012 18:53:15 -0700 (PDT)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id C1C0D431FC9\r
20         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:08 -0700 (PDT)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id 0E3402E50D80\r
23         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:08 -0700 (PDT)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
25 Received: from finestructure.net (unknown [76.89.192.57])\r
26         (Authenticated sender: jrollins)\r
27         by fire-doxen-submit (Postfix) with ESMTP id C7955328012\r
28         for <notmuch@notmuchmail.org>; Sun, 19 Aug 2012 18:53:05 -0700 (PDT)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 0563ED19; Sun, 19 Aug 2012 18:53:04 -0700 (PDT)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH 11/11] lib: add recipients to database\r
34 Date: Sun, 19 Aug 2012 18:52:50 -0700\r
35 Message-Id: <1345427570-26518-12-git-send-email-jrollins@finestructure.net>\r
36 X-Mailer: git-send-email 1.7.10.4\r
37 In-Reply-To: <1345427570-26518-11-git-send-email-jrollins@finestructure.net>\r
38 References: <1345427570-26518-1-git-send-email-jrollins@finestructure.net>\r
39         <1345427570-26518-2-git-send-email-jrollins@finestructure.net>\r
40         <1345427570-26518-3-git-send-email-jrollins@finestructure.net>\r
41         <1345427570-26518-4-git-send-email-jrollins@finestructure.net>\r
42         <1345427570-26518-5-git-send-email-jrollins@finestructure.net>\r
43         <1345427570-26518-6-git-send-email-jrollins@finestructure.net>\r
44         <1345427570-26518-7-git-send-email-jrollins@finestructure.net>\r
45         <1345427570-26518-8-git-send-email-jrollins@finestructure.net>\r
46         <1345427570-26518-9-git-send-email-jrollins@finestructure.net>\r
47         <1345427570-26518-10-git-send-email-jrollins@finestructure.net>\r
48         <1345427570-26518-11-git-send-email-jrollins@finestructure.net>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Mon, 20 Aug 2012 01:53:17 -0000\r
62 \r
63 This adds just the "to" recipients, but probably "cc"s should be\r
64 included as well.\r
65 ---\r
66  lib/database.cc       |    2 +-\r
67  lib/message.cc        |    4 ++++\r
68  lib/notmuch-private.h |    2 ++\r
69  3 files changed, 7 insertions(+), 1 deletion(-)\r
70 \r
71 diff --git a/lib/database.cc b/lib/database.cc\r
72 index 761dc1a..4c1d578 100644\r
73 --- a/lib/database.cc\r
74 +++ b/lib/database.cc\r
75 @@ -1814,7 +1814,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,\r
76                 goto DONE;\r
77  \r
78             date = notmuch_message_file_get_header (message_file, "date");\r
79 -           _notmuch_message_set_header_values (message, date, from, subject);\r
80 +           _notmuch_message_set_header_values (message, date, from, to, subject);\r
81  \r
82             _notmuch_message_index_file (message, filename);\r
83         } else {\r
84 diff --git a/lib/message.cc b/lib/message.cc\r
85 index fa28073..cc5c8a0 100644\r
86 --- a/lib/message.cc\r
87 +++ b/lib/message.cc\r
88 @@ -420,6 +420,8 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header)\r
89       * available */\r
90      if (strcasecmp (header, "from") == 0)\r
91         value = message->doc.get_value (NOTMUCH_VALUE_FROM);\r
92 +    if (strcasecmp (header, "to") == 0)\r
93 +       value = message->doc.get_value (NOTMUCH_VALUE_TO);\r
94      else if (strcasecmp (header, "subject") == 0)\r
95         value = message->doc.get_value (NOTMUCH_VALUE_SUBJECT);\r
96      else if (strcasecmp (header, "message-id") == 0)\r
97 @@ -830,6 +832,7 @@ void\r
98  _notmuch_message_set_header_values (notmuch_message_t *message,\r
99                                     const char *date,\r
100                                     const char *from,\r
101 +                                   const char *to,\r
102                                     const char *subject)\r
103  {\r
104      time_t time_value;\r
105 @@ -844,6 +847,7 @@ _notmuch_message_set_header_values (notmuch_message_t *message,\r
106      message->doc.add_value (NOTMUCH_VALUE_TIMESTAMP,\r
107                             Xapian::sortable_serialise (time_value));\r
108      message->doc.add_value (NOTMUCH_VALUE_FROM, from);\r
109 +    message->doc.add_value (NOTMUCH_VALUE_TO, to);\r
110      message->doc.add_value (NOTMUCH_VALUE_SUBJECT, subject);\r
111  }\r
112  \r
113 diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h\r
114 index 32d1523..f56c580 100644\r
115 --- a/lib/notmuch-private.h\r
116 +++ b/lib/notmuch-private.h\r
117 @@ -95,6 +95,7 @@ typedef enum {\r
118      NOTMUCH_VALUE_TIMESTAMP = 0,\r
119      NOTMUCH_VALUE_MESSAGE_ID,\r
120      NOTMUCH_VALUE_FROM,\r
121 +    NOTMUCH_VALUE_TO,\r
122      NOTMUCH_VALUE_SUBJECT\r
123  } notmuch_value_t;\r
124  \r
125 @@ -291,6 +292,7 @@ void\r
126  _notmuch_message_set_header_values (notmuch_message_t *message,\r
127                                     const char *date,\r
128                                     const char *from,\r
129 +                                   const char *to,\r
130                                     const char *subject);\r
131  void\r
132  _notmuch_message_sync (notmuch_message_t *message);\r
133 -- \r
134 1.7.10.4\r
135 \r