Charcoal-SE / SmokeDetector

Headless chatbot that detects spam and posts links to it in chatrooms for quick deletion.
https://metasmoke.erwaysoftware.com
Apache License 2.0
464 stars 175 forks source link

Coordinate manual reporting/scanning with bodyfetcher.py scanning (e.g. prevent reporting of a post which is currently being scanned) #7552

Open makyen opened 1 year ago

makyen commented 1 year ago

There's currently no coordination between manual scanning initiated via any chat commands, via the MS API, and the scanning performed in bodyfetcher.py other than the chat based scan/report will reply that a post has already been reported, if a scan has previously completed and the post was reported.

Along with a variety of other issues, this can result in a post being scanned and reported multiple times.

makyen commented 1 year ago

One possible solution to this is to break at least some of the check/scan logic out of bodyfetcher.py, such that scanning and reporting initiated from other sources also uses the existing logic, including the post processing lock, recently scanned posts, etc. It's probably also desirable to have manual scans included in stats, at least to some extent.