use File::Spec ();
use PublicInbox::Search qw(xap_terms);
use PublicInbox::Spawn qw(popen_rd);
+use PublicInbox::MID qw(mids);
sub new {
my ($class) = @_;
my $mo = { %{$lei->{mset_opt}} };
my $mset;
my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei, $ibxish);
- my $dedupe = $lei->{dedupe} // die 'BUG: {dedupe} missing';
- $dedupe->prepare_dedupe;
do {
$mset = $srch->mset($mo->{qstr}, $mo);
my $ids = $srch->mset_to_artnums($mset, $mo);
for my $n (@{$ctx->{xids}}) {
my $smsg = $over->get_art($n) or next;
wait_startq($startq) if $startq;
- next if $dedupe->is_smsg_dup($smsg);
my $mitem = delete $n2item{$smsg->{num}};
$each_smsg->($smsg, $mitem);
}
attach_external($self, $loc);
}
my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei, $self);
- my $dedupe = $lei->{dedupe} // die 'BUG: {dedupe} missing';
- $dedupe->prepare_dedupe;
do {
$mset = $self->mset($mo->{qstr}, $mo);
for my $mitem ($mset->items) {
my $smsg = smsg_for($self, $mitem) or next;
wait_startq($startq) if $startq;
- next if $dedupe->is_smsg_dup($smsg);
$each_smsg->($smsg, $mitem);
}
} while (_mset_more($mset, $mo));
my ($eml, $self, $lei, $each_smsg) = @_;
my $smsg = bless {}, 'PublicInbox::Smsg';
$smsg->populate($eml);
+ $smsg->parse_references($eml, mids($eml));
$smsg->{$_} //= '' for qw(from to cc ds subject references mid);
delete @$smsg{qw(From Subject -ds -ts)};
if (my $startq = delete($self->{5})) { wait_startq($startq) }
- return if !$lei->{l2m} && $lei->{dedupe}->is_smsg_dup($smsg);
$each_smsg->($smsg, undef, $eml);
}
my ($opt, $env) = @$lei{qw(opt env)};
my @qform = (q => $lei->{mset_opt}->{qstr}, x => 'm');
push(@qform, t => 1) if $opt->{thread};
- my $dedupe = $lei->{dedupe} // die 'BUG: {dedupe} missing';
- $dedupe->prepare_dedupe;
- my @cmd = qw(curl -XPOST -sSf);
+ my @cmd = (qw(curl -sSf -d), '');
my $verbose = $opt->{verbose};
push @cmd, '-v' if $verbose;
for my $o ($lei->curl_opt) {
}
$opt->{torsocks} = 'false' if $opt->{'no-torsocks'};
my $tor = $opt->{torsocks} //= 'auto';
+ my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei);
for my $uri (@$uris) {
$uri->query_form(@qform);
- my $each_smsg = $lei->{ovv}->ovv_each_smsg_cb($lei, $uri);
my $cmd = [ @cmd, $uri->as_string ];
if ($tor eq 'auto' && substr($uri->host, -6) eq '.onion' &&
(($env->{LD_PRELOAD}//'') !~ /torsocks/)) {
$lei->child_error($?);
}
}
+ undef $each_smsg;
$lei->{ovv}->ovv_atexit_child($lei);
}