diff options
author | Eric Wong <e@yhbt.net> | 2020-06-29 10:34:17 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-30 03:05:21 +0000 |
commit | 1b356e8d587a9c1bb92a11ffce255a3d3c25747c (patch) | |
tree | 883f7f9a1efc0525d85542af26cd9726744f7155 /lib/PublicInbox/V2Writable.pm | |
parent | fd7140782db39585e90e59f5fd0801bf42490570 (diff) | |
download | public-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/V2Writable.pm')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 8b31b69a..528f5e9a 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -171,7 +171,7 @@ sub _add { # spam check: if ($check_cb) { - $mime = $check_cb->($mime) or return; + $mime = $check_cb->($mime, $self->{-inbox}) or return; } # All pipes (> $^F) known to Perl 5.6+ have FD_CLOEXEC set, |