The condition was using a reversed sense for the test of the return
value of strcasestr, (perhaps confusing it with the usage of strcmp?).
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;
}