diff options
author | Carl Worth <cworth@cworth.org> | 2010-04-12 15:45:40 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-04-12 15:45:40 -0700 |
commit | 071022c253a6c2fbf445478619d1a32d945be438 (patch) | |
tree | 5d6ac3705d2bf44305c6dd8c6dd233ccdb6e7a21 /lib/database.cc | |
parent | 328626d0fd17910eec5d8b5b51dda46f4bbd8189 (diff) |
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.
Diffstat (limited to 'lib/database.cc')
-rw-r--r-- | lib/database.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/database.cc b/lib/database.cc index 415b0d7..ff6f100 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1313,14 +1313,15 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch, const char *parent_thread_id; 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, message, parent_message_id); - if (parent_thread_id == NULL) { - _notmuch_message_add_term (message, "reference", - parent_message_id); - } else { + 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); |