mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
lib: Always add reference terms to the database.
Previously, we were only adding the reference terms for cases where the referenced message did not yet exist in the database. For thread presentation, it's useful to have the connection information provided by the references, even when the messages are present. So add this term unconditionally.
This commit is contained in:
parent
328626d0fd
commit
071022c253
1 changed files with 5 additions and 4 deletions
|
@ -1313,14 +1313,15 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,
|
||||||
const char *parent_thread_id;
|
const char *parent_thread_id;
|
||||||
|
|
||||||
parent_message_id = (char *) l->data;
|
parent_message_id = (char *) l->data;
|
||||||
|
|
||||||
|
_notmuch_message_add_term (message, "reference",
|
||||||
|
parent_message_id);
|
||||||
|
|
||||||
parent_thread_id = _resolve_message_id_to_thread_id (notmuch,
|
parent_thread_id = _resolve_message_id_to_thread_id (notmuch,
|
||||||
message,
|
message,
|
||||||
parent_message_id);
|
parent_message_id);
|
||||||
|
|
||||||
if (parent_thread_id == NULL) {
|
if (parent_thread_id != NULL) {
|
||||||
_notmuch_message_add_term (message, "reference",
|
|
||||||
parent_message_id);
|
|
||||||
} else {
|
|
||||||
if (*thread_id == NULL) {
|
if (*thread_id == NULL) {
|
||||||
*thread_id = talloc_strdup (message, parent_thread_id);
|
*thread_id = talloc_strdup (message, parent_thread_id);
|
||||||
_notmuch_message_add_term (message, "thread", *thread_id);
|
_notmuch_message_add_term (message, "thread", *thread_id);
|
||||||
|
|
Loading…
Reference in a new issue