X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=3f934265a73727feceb0f5dfa26bc70f55669dbe;hb=523f06a0add737aa0577f43c319f069bc0ff10f3;hp=e6a5a5af9651d207b01ca755e6adbba700fc0a85;hpb=df8885f62c13f77b2b16cbb211e3a727945870b0;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index e6a5a5af..3f934265 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -193,14 +193,16 @@ _notmuch_message_create (const void *talloc_owner, * There is already a document with message ID 'message_id' in the * database. The returned message can be used to query/modify the * document. + * * NOTMUCH_PRIVATE_STATUS_NO_DOCUMENT_FOUND: * * No document with 'message_id' exists in the database. The * returned message contains a newly created document (not yet * added to the database) and a document ID that is known not to - * exist in the database. The caller can modify the message, and a - * call to _notmuch_message_sync will add * the document to the - * database. + * exist in the database. This message is "blank"; that is, it + * contains only a message ID and no other metadata. The caller + * can modify the message, and a call to _notmuch_message_sync + * will add the document to the database. * * If an error occurs, this function will return NULL and *status * will be set as appropriate. (The status pointer argument must @@ -1032,6 +1034,8 @@ _notmuch_message_gen_terms (notmuch_message_t *message, /* Create a gap between this an the next terms so they don't * appear to be a phrase. */ message->termpos = term_gen->get_termpos () + 100; + + _notmuch_message_invalidate_metadata (message, prefix_name); } term_gen->set_termpos (message->termpos);