]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
searchidx: fix ghost root vivification
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index 8a529c66c2d60257437c55219f0ad028acff22dc..e4e3c81b82f60a7c8d4392d8f0f7917dc6634d45 100644 (file)
@@ -330,7 +330,7 @@ sub link_message {
                        merge_threads($self, $tid, $ptid);
                }
        } else {
-               $tid = $self->next_thread_id;
+               $tid = defined $old_tid ? $old_tid : $self->next_thread_id;
        }
        $doc->add_term(xpfx('thread') . $tid);
 }