FIX: ensure that posts that are trust level 1 and above are still checked.

FIX: ensure that posts that are trust level 1 and above are still checked.

The post state needed to be marked as new in order for the check for spam posts to pick potential spam posts up if they are created by trust level 1 and above.

diff --git a/plugin.rb b/plugin.rb
index d919de7..f4dc4b1 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -51,7 +51,12 @@ after_initialize do
       bouncer.store_additional_information(post, params)
 
       # Enqueue checks for TL0 posts faster
-      bouncer.enqueue_for_check(post) if post.user.trust_level == 0
+      if post.user.trust_level == 0
+        bouncer.enqueue_for_check(post)
+      else
+        # Otherwise, mark the post to be checked in the next batch
+        bouncer.move_to_state(post, 'new')
+      end
     end
   end
 

GitHub sha: 7c097524

1 Like

Should there be a test for that?

1 Like

Added specs here:

1 Like