]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch reply: Fix the support for reply-to un-munging.
authorCarl Worth <cworth@cworth.org>
Thu, 4 Feb 2010 20:27:42 +0000 (12:27 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 4 Feb 2010 20:42:09 +0000 (12:42 -0800)
The condition was using a reversed sense for the test of the return
value of strcasestr, (perhaps confusing it with the usage of strcmp?).

notmuch-reply.c

index 31679a57225e1f2212797f05575c4aeef307a625..671a915589421cf63cac451eaa553202235d6eb9 100644 (file)
@@ -220,8 +220,8 @@ mailing_list_munged_reply_to (notmuch_message_t *message)
     addr = internet_address_mailbox_get_addr (mailbox);
 
     /* Note that strcasestr() is a GNU extension, strstr() might be sufficient */
-    if (strcasestr (notmuch_message_get_header (message, "to"), addr) == 0 ||
-       strcasestr (notmuch_message_get_header (message, "cc"), addr) == 0)
+    if (strcasestr (notmuch_message_get_header (message, "to"), addr) != 0 ||
+       strcasestr (notmuch_message_get_header (message, "cc"), addr) != 0)
     {
        return 1;
     }