summary refs log tree commit diff
path: root/synapse/spam_checker_api (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Uniformize spam-checker API: github/ts/spam-errors ts/spam-errorsDavid Teller2022-05-111-1/+19
| | | | | | - Some callbacks should return `True` to allow, `False` to deny, while others should return `True` to deny and `False` to allow. With this PR, all callbacks return `ALLOW` to allow or a `Codes` (typically `Codes.FORBIDDEN`) to deny. - Similarly, some methods returned `True` to allow, `False` to deny, while others returned `True` to deny and `False` to allow. They now all return `ALLOW` to allow or a `Codes` to deny. - Spam-checker implementations may now return an explicit code, e.g. to differentiate between "User account has been suspended" (which is in practice required by law in some countries, including UK) and "This message looks like spam".
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Combine `SpamCheckerApi` with the more generic `ModuleApi`. (#8464)Richard van der Hoff2020-10-071-43/+0
| | | | | Lots of different module apis is not easy to maintain. Rather than adding yet another ModuleApi(hs, hs.get_auth_handler()) incantation, first add an hs.get_module_api() method and use it where possible.
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-1/+1
|
* Allow denying or shadow banning registrations via the spam checker (#8034)Patrick Cloke2020-08-201-0/+11
|
* Do not assume calls to runInteraction return Deferreds. (#8133)Patrick Cloke2020-08-201-2/+4
|
* Convert events worker database to async/await. (#8071)Patrick Cloke2020-08-181-1/+1
|
* Add type hints to the spam check module (#6915)Patrick Cloke2020-02-141-4/+8
| | | | Add typing information to the spam checker modules.
* Expose some homeserver functionality to spam checkers (#6259)Travis Ralston2019-10-311-0/+51
* Offer the homeserver instance to the spam checker * Newsfile * Linting * Expose a Spam Checker API instead of passing the homeserver object * Alter changelog * s/hs/api