]> Sergey Matveev's repositories - public-inbox.git/commitdiff
watch: use "spam" in commit message for removals
authorEric Wong <e@80x24.org>
Thu, 16 Nov 2017 19:23:49 +0000 (19:23 +0000)
committerEric Wong <e@80x24.org>
Thu, 16 Nov 2017 19:23:49 +0000 (19:23 +0000)
This makes it easy to identify the reason for message removals.

lib/PublicInbox/WatchMaildir.pm

index 5ae3d21f31d7f9f1c6988e976f9bde0d0c4005ff..424186bd35f5f36ea5d02cc18cfdc8561ec55551 100644 (file)
@@ -132,11 +132,11 @@ sub _remove_spam {
                my ($ibx) = @_;
                eval {
                        my $im = _importer_for($self, $ibx);
-                       $im->remove($mime);
+                       $im->remove($mime, 'spam');
                        if (my $scrub = _scrubber_for($ibx)) {
                                my $scrubbed = $scrub->scrub($mime) or return;
                                $scrubbed == 100 and return;
-                               $im->remove($scrubbed);
+                               $im->remove($scrubbed, 'spam');
                        }
                };
                if ($@) {