X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=script%2Fpublic-inbox-learn;h=93aece2e66b6c0d0fecf1d718070e5e213099f7a;hb=a65ebdc3a1f064bab0cddf64b34caad49f1c4c9c;hp=3073294a18bb526138d24e6898325157726c9586;hpb=dc84f78e4b3c7f5c8384fbf5a6b538ac1826a604;p=public-inbox.git diff --git a/script/public-inbox-learn b/script/public-inbox-learn index 3073294a..93aece2e 100644 --- a/script/public-inbox-learn +++ b/script/public-inbox-learn @@ -39,8 +39,8 @@ my $mime = PublicInbox::MIME->new(eval { $data }); -sub remove_or_add ($$$) { - my ($ibx, $train, $addr) = @_; +sub remove_or_add ($$$$) { + my ($ibx, $train, $mime, $addr) = @_; # We do not touch GIT_COMMITTER_* env here so we can track # who trained the message. @@ -93,12 +93,12 @@ if ($train eq 'spam') { while (my ($addr, $ibx) = each %dests) { next unless ref($ibx); # $ibx may be 0 next if $seen{"$ibx"}++; - remove_or_add($ibx, $train, $addr); + remove_or_add($ibx, $train, $mime, $addr); } my $dests = PublicInbox::MDA->inboxes_for_list_id($pi_config, $mime); for my $ibx (@$dests) { next if !$seen{"$ibx"}++; - remove_or_add($ibx, $train, $ibx->{-primary_address}); + remove_or_add($ibx, $train, $mime, $ibx->{-primary_address}); } }