]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_xsearch: add_eml for remote mboxrd, not set_eml
authorEric Wong <e@80x24.org>
Wed, 3 Mar 2021 13:48:55 +0000 (13:48 +0000)
committerEric Wong <e@80x24.org>
Thu, 4 Mar 2021 18:29:18 +0000 (14:29 -0400)
set_eml will clobber any existing keywords.  Since remote
mboxrds cannot (and should not) be sending keywords to us,
we shouldn't let remote external requests clobber already-set
keywords if they exist.

lib/PublicInbox/LeiXSearch.pm

index d4607e16a331c72b270bcf90598cc2f2067dea2b..dcc4880614a8b727f7bc14f322836cf33d71eaf5 100644 (file)
@@ -204,7 +204,7 @@ sub query_mset { # non-parallel for non-"--threads" users
 
 sub each_remote_eml { # callback for MboxReader->mboxrd
        my ($eml, $self, $lei, $each_smsg) = @_;
-       $lei->{sto}->ipc_do('set_eml', $eml) if $lei->{sto}; # --import-remote
+       $lei->{sto}->ipc_do('add_eml', $eml) if $lei->{sto}; # --import-remote
        my $smsg = bless {}, 'PublicInbox::Smsg';
        $smsg->populate($eml);
        $smsg->parse_references($eml, mids($eml));