X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=0e3b5a4f1510722729d60e73322baf2d529219bc;hb=debfae20db9a45ce7e12ac51db2b0104cd3b0be2;hp=75f36bdda55fc193e71c91741c42c6d74fa47508;hpb=8a8fb39b0c0199f224f4477cbcab2d7a578fee0f;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index 75f36bdd..0e3b5a4f 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1560,6 +1560,13 @@ _ensure_maildir_flags (notmuch_message_t *message, notmuch_bool_t force) message->maildir_flags = combined_flags; } +notmuch_bool_t +notmuch_message_has_maildir_flag (notmuch_message_t *message, char flag) +{ + _ensure_maildir_flags (message, FALSE); + return message->maildir_flags && (strchr (message->maildir_flags, flag) != NULL); +} + notmuch_status_t notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) { @@ -2027,7 +2034,9 @@ notmuch_message_reindex (notmuch_message_t *message, thread_id = orig_thread_id; _notmuch_message_add_term (message, "thread", thread_id); - _notmuch_message_set_header_values (message, date, from, subject); + /* Take header values only from first filename */ + if (found == 0) + _notmuch_message_set_header_values (message, date, from, subject); ret = _notmuch_message_index_file (message, message_file);