X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase.cc;h=6842fafadad86967b4363abd5869a2aeaef345c2;hb=a1099660806a29b883e2210669e385648465f169;hp=ff6f100db98f6db7e4ae237b9c3efb4dfc33093b;hpb=071022c253a6c2fbf445478619d1a32d945be438;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index ff6f100d..6842fafa 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1321,15 +1321,13 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch, message, parent_message_id); - if (parent_thread_id != NULL) { - if (*thread_id == NULL) { - *thread_id = talloc_strdup (message, parent_thread_id); - _notmuch_message_add_term (message, "thread", *thread_id); - } else if (strcmp (*thread_id, parent_thread_id)) { - ret = _merge_threads (notmuch, *thread_id, parent_thread_id); - if (ret) - goto DONE; - } + if (*thread_id == NULL) { + *thread_id = talloc_strdup (message, parent_thread_id); + _notmuch_message_add_term (message, "thread", *thread_id); + } else if (strcmp (*thread_id, parent_thread_id)) { + ret = _merge_threads (notmuch, *thread_id, parent_thread_id); + if (ret) + goto DONE; } }