From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 199ED1F9FF for ; Wed, 3 Mar 2021 13:48:58 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/4] lei_xsearch: add_eml for remote mboxrd, not set_eml Date: Wed, 3 Mar 2021 13:48:55 +0000 Message-Id: <20210303134857.7227-3-e@80x24.org> In-Reply-To: <20210303134857.7227-1-e@80x24.org> References: <20210303134857.7227-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index d4607e16..dcc48806 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -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));