Wiki source code of AntiSpam
Last modified by Vincent Massol on 2026/08/13 13:58
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | Everything the [[AntiSpam Tools application>>doc:extensions:Extension.AntiSpam Tool Application.WebHome]] exposes to a script goes through one Component, the ##$services.antispam## Script Service documented in [[AntiSpam Scripting API>>doc:documentation.extensions.dev.antispam.scripting-api.WebHome]]: the screens the extension ships are themselves wiki pages calling it, so a script of your own can search, check and clean exactly as they do. | ||
| 2 | |||
| 3 | Three Component roles are extension points rather than script entry points. A ##SpamChecker## decides whether a piece of content is spam, and the extension registers one under the ##simple## hint; registering another under your own hint makes it selectable wherever a checker hint is passed. A ##SpamCleaner## performs the searching and the deletion the application home page drives. A ##SpamCheckerProtectionManager## answers whether an account must never be disabled, deleted or cleaned, and every part of the extension asks it before acting — see [[Protected Users>>doc:documentation.extensions.admin.antispam.protected-users.WebHome]]. | ||
| 4 | |||
| 5 | Detection itself is not something a script triggers. It is an Event Listener on ##DocumentCreatingEvent## and ##DocumentUpdatingEvent## that cancels the save when the document matches, which is described from the administrator's side in [[Spam Detection When Saving a Page>>doc:documentation.extensions.admin.antispam.spam-detection.WebHome]]. |