mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:46:01 -04:00
Uniformize spam-checker API, part 2: check_event_for_spam (#12808)
Signed-off-by: David Teller <davidt@element.io>
This commit is contained in:
parent
4cc4229cd7
commit
28199e9357
10 changed files with 128 additions and 30 deletions
|
@ -35,6 +35,7 @@ from typing_extensions import ParamSpec
|
|||
from twisted.internet import defer
|
||||
from twisted.web.resource import Resource
|
||||
|
||||
from synapse import spam_checker_api
|
||||
from synapse.api.errors import SynapseError
|
||||
from synapse.events import EventBase
|
||||
from synapse.events.presence_router import (
|
||||
|
@ -140,6 +141,9 @@ are loaded into Synapse.
|
|||
|
||||
PRESENCE_ALL_USERS = PresenceRouter.ALL_USERS
|
||||
|
||||
ALLOW = spam_checker_api.Allow.ALLOW
|
||||
# Singleton value used to mark a message as permitted.
|
||||
|
||||
__all__ = [
|
||||
"errors",
|
||||
"make_deferred_yieldable",
|
||||
|
@ -147,6 +151,7 @@ __all__ = [
|
|||
"respond_with_html",
|
||||
"run_in_background",
|
||||
"cached",
|
||||
"Allow",
|
||||
"UserID",
|
||||
"DatabasePool",
|
||||
"LoggingTransaction",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue