unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test: add known broken test for reply from address in named group list
@ 2012-01-14 21:49 Jani Nikula
  2012-01-14 21:49 ` [PATCH 2/2] cli: pick the user's address in a group list as from address Jani Nikula
  2012-01-17  1:09 ` [PATCH 1/2] test: add known broken test for reply from address in named group list David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2012-01-14 21:49 UTC (permalink / raw)
  To: notmuch

If a message was received to the user's address that was in a named
group list, notmuch reply does not use that address for picking the
from address.

Groups lists are of the form: foo:bar@example.com,baz@example.com;

Signed-off-by: Jani Nikula <jani@nikula.org>
---
 test/reply |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/test/reply b/test/reply
index c0b8e26..196535a 100755
--- a/test/reply
+++ b/test/reply
@@ -72,6 +72,25 @@ References: <${gen_msg_id}>
 On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 > reply from alternate address"
 
+test_begin_subtest "Reply from address in named group list"
+test_subtest_known_broken
+add_message '[from]="Sender <sender@example.com>"' \
+            '[to]=group:test_suite@notmuchmail.org,someone@example.com\;' \
+             [cc]=test_suite_other@notmuchmail.org \
+             [subject]=notmuch-reply-test \
+            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+            '[body]="Reply from address in named group list"'
+
+output=$(notmuch reply id:${gen_msg_id})
+test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
+Subject: Re: notmuch-reply-test
+To: Sender <sender@example.com>, someone@example.com
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
+> Reply from address in named group list"
+
 test_begin_subtest "Support for Reply-To"
 add_message '[from]="Sender <sender@example.com>"' \
              [to]=test_suite@notmuchmail.org \
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] cli: pick the user's address in a group list as from address
  2012-01-14 21:49 [PATCH 1/2] test: add known broken test for reply from address in named group list Jani Nikula
@ 2012-01-14 21:49 ` Jani Nikula
  2012-01-14 23:10   ` Austin Clements
  2012-01-15 19:54   ` Tomi Ollila
  2012-01-17  1:09 ` [PATCH 1/2] test: add known broken test for reply from address in named group list David Bremner
  1 sibling, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2012-01-14 21:49 UTC (permalink / raw)
  To: notmuch

Messages received to a group list were not replied to using the from
address in the list. Fix it.

Signed-off-by: Jani Nikula <jani@nikula.org>
---
 notmuch-reply.c |    2 +-
 test/reply      |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/notmuch-reply.c b/notmuch-reply.c
index da3acce..0f682db 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -203,7 +203,7 @@ scan_address_list (InternetAddressList *list,
 	    if (group_list == NULL)
 		continue;
 
-	    n += scan_address_list (group_list, config, message, type, NULL);
+	    n += scan_address_list (group_list, config, message, type, user_from);
 	} else {
 	    InternetAddressMailbox *mailbox;
 	    const char *name;
diff --git a/test/reply b/test/reply
index 196535a..e4e16eb 100755
--- a/test/reply
+++ b/test/reply
@@ -73,7 +73,6 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 > reply from alternate address"
 
 test_begin_subtest "Reply from address in named group list"
-test_subtest_known_broken
 add_message '[from]="Sender <sender@example.com>"' \
             '[to]=group:test_suite@notmuchmail.org,someone@example.com\;' \
              [cc]=test_suite_other@notmuchmail.org \
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] cli: pick the user's address in a group list as from address
  2012-01-14 21:49 ` [PATCH 2/2] cli: pick the user's address in a group list as from address Jani Nikula
@ 2012-01-14 23:10   ` Austin Clements
  2012-01-15 19:54   ` Tomi Ollila
  1 sibling, 0 replies; 5+ messages in thread
From: Austin Clements @ 2012-01-14 23:10 UTC (permalink / raw)
  To: Jani Nikula; +Cc: notmuch

Quoth Jani Nikula on Jan 14 at 11:49 pm:
> Messages received to a group list were not replied to using the from
> address in the list. Fix it.
> 
> Signed-off-by: Jani Nikula <jani@nikula.org>

Both LGTM.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] cli: pick the user's address in a group list as from address
  2012-01-14 21:49 ` [PATCH 2/2] cli: pick the user's address in a group list as from address Jani Nikula
  2012-01-14 23:10   ` Austin Clements
@ 2012-01-15 19:54   ` Tomi Ollila
  1 sibling, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2012-01-15 19:54 UTC (permalink / raw)
  To: Jani Nikula, notmuch

On Sat, 14 Jan 2012 23:49:50 +0200, Jani Nikula <jani@nikula.org> wrote:
> Messages received to a group list were not replied to using the from
> address in the list. Fix it.
> 
> Signed-off-by: Jani Nikula <jani@nikula.org>
> ---

Both LGTM.

Tomi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] test: add known broken test for reply from address in named group list
  2012-01-14 21:49 [PATCH 1/2] test: add known broken test for reply from address in named group list Jani Nikula
  2012-01-14 21:49 ` [PATCH 2/2] cli: pick the user's address in a group list as from address Jani Nikula
@ 2012-01-17  1:09 ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2012-01-17  1:09 UTC (permalink / raw)
  To: Jani Nikula, notmuch

On Sat, 14 Jan 2012 23:49:49 +0200, Jani Nikula <jani@nikula.org> wrote:
> If a message was received to the user's address that was in a named
> group list, notmuch reply does not use that address for picking the
> from address.

Pushed.

d

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-17  1:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-14 21:49 [PATCH 1/2] test: add known broken test for reply from address in named group list Jani Nikula
2012-01-14 21:49 ` [PATCH 2/2] cli: pick the user's address in a group list as from address Jani Nikula
2012-01-14 23:10   ` Austin Clements
2012-01-15 19:54   ` Tomi Ollila
2012-01-17  1:09 ` [PATCH 1/2] test: add known broken test for reply from address in named group list David Bremner

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).