]> git.notmuchmail.org Git - notmuch/blobdiff - query.cc
Use _find_prefix instead of hard-coded term in notmuch_query_search
[notmuch] / query.cc
index 5750167580c0f94ecf0eae11a18aef7ce399300d..ae986d35c9d1499bfb5695a252959a054a18357b 100644 (file)
--- a/query.cc
+++ b/query.cc
@@ -92,7 +92,9 @@ notmuch_query_search (notmuch_query_t *query)
 
     try {
        Xapian::Enquire enquire (*notmuch->xapian_db);
-       Xapian::Query mail_query ("Kmail");
+       Xapian::Query mail_query (talloc_asprintf (query, "%s%s",
+                                                  _find_prefix ("type"),
+                                                  "mail"));
        Xapian::Query string_query, final_query;
        Xapian::MSet mset;
        unsigned int flags = (Xapian::QueryParser::FLAG_BOOLEAN |