aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Aaron Ecay <aaronecay@gmail.com>2013-03-05 22:31:49 -0500
committerGravatar David Bremner <bremner@unb.ca>2013-05-13 21:29:13 -0300
commitcf8aaafbad6815ebdfcd9b3b36cfe3ca5ff2764b (patch)
tree55d81c9a7e3b0af3f26f7cec7207a7f11b71ec49 /test
parent983d5e1df2b227b8dfbc71984c828b925f4025f7 (diff)
lib/database.cc: change how the parent of a message is calculated
Presently, the code which finds the parent of a message as it is being added to the database assumes that the first Message-ID-like substring of the In-Reply-To header is the parent Message ID. Some mail clients, however, put stuff other than the Message-ID of the parent in the In-Reply-To header, such as the email address of the sender of the parent. This can fool notmuch. The updated algorithm prefers the last Message ID in the References header. The References header lists messages oldest-first, so the last Message ID is the parent (RFC2822, p. 24). The References header is also less likely to be in a non-standard syntax (http://cr.yp.to/immhf/thread.html, http://www.jwz.org/doc/threading.html). In case the References header is not to be found, fall back to the old behavior. V2 of this patch, incorporating feedback from Jani and (indirectly) Austin.
Diffstat (limited to 'test')
-rwxr-xr-xtest/thread-replies3
1 files changed, 0 insertions, 3 deletions
diff --git a/test/thread-replies b/test/thread-replies
index 5fc5eedd..eeb70d06 100755
--- a/test/thread-replies
+++ b/test/thread-replies
@@ -12,7 +12,6 @@ test_description='test of proper handling of in-reply-to and references headers'
. ./test-lib.sh
test_begin_subtest "Use References when In-Reply-To is broken"
-test_subtest_known_broken
add_message '[id]="foo@one.com"' \
'[subject]=one'
add_message '[in-reply-to]="mumble"' \
@@ -47,7 +46,6 @@ expected=`echo "$expected" | notmuch_json_show_sanitize`
test_expect_equal_json "$output" "$expected"
test_begin_subtest "Prefer References to In-Reply-To"
-test_subtest_known_broken
add_message '[id]="foo@two.com"' \
'[subject]=two'
add_message '[in-reply-to]="<bar@baz.com>"' \
@@ -104,7 +102,6 @@ expected=`echo "$expected" | notmuch_json_show_sanitize`
test_expect_equal_json "$output" "$expected"
test_begin_subtest "Use last Reference"
-test_subtest_known_broken
add_message '[id]="foo@four.com"' \
'[subject]="four"'
add_message '[id]="bar@four.com"' \