about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-29 10:34:17 +0000
committerEric Wong <e@yhbt.net>2020-06-30 03:05:21 +0000
commit1b356e8d587a9c1bb92a11ffce255a3d3c25747c (patch)
tree883f7f9a1efc0525d85542af26cd9726744f7155 /lib/PublicInbox/Import.pm
parentfd7140782db39585e90e59f5fd0801bf42490570 (diff)
downloadpublic-inbox-1b356e8d587a9c1bb92a11ffce255a3d3c25747c.tar.gz
watch: check for duplicates in ->over before spamcheck
It's cheaper to check for duplicates than run `spamc'
repeatedly when rechecking.  We already do this for
v1 with by using the "ls" command with fast-import,
but v2 requires checking against over.sqlite3.
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index ae508cd8..fb813159 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -387,7 +387,7 @@ sub add {
 
         # spam check:
         if ($check_cb) {
-                $mime = $check_cb->($mime) or return;
+                $mime = $check_cb->($mime, $self->{-inbox}) or return;
         }
 
         my $blob = $self->{mark}++;