summary refs log tree commit diff
path: root/synapse/module_api
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-05-31 14:48:22 +0100
committerErik Johnston <erik@matrix.org>2022-05-31 14:48:22 +0100
commit3594f6c1f340f12bfcb2fec9e99ac108a714b508 (patch)
treef7f995f24f23cc3b270b625971f60bc4ad98fb46 /synapse/module_api
parentTest Synapse against Complement with workers. (#12810) (diff)
parentUpdate changelog (diff)
downloadsynapse-3594f6c1f340f12bfcb2fec9e99ac108a714b508.tar.xz
Merge branch 'master' into develop
Diffstat (limited to 'synapse/module_api')
-rw-r--r--synapse/module_api/__init__.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py
index 6668f64c90..b7451fc870 100644
--- a/synapse/module_api/__init__.py
+++ b/synapse/module_api/__init__.py
@@ -35,7 +35,6 @@ 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 (
@@ -55,6 +54,7 @@ from synapse.events.spamcheck import (
     USER_MAY_JOIN_ROOM_CALLBACK,
     USER_MAY_PUBLISH_ROOM_CALLBACK,
     USER_MAY_SEND_3PID_INVITE_CALLBACK,
+    SpamChecker,
 )
 from synapse.events.third_party_rules import (
     CHECK_CAN_DEACTIVATE_USER_CALLBACK,
@@ -140,9 +140,7 @@ 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.
+NOT_SPAM = SpamChecker.NOT_SPAM
 
 __all__ = [
     "errors",
@@ -151,7 +149,7 @@ __all__ = [
     "respond_with_html",
     "run_in_background",
     "cached",
-    "Allow",
+    "NOT_SPAM",
     "UserID",
     "DatabasePool",
     "LoggingTransaction",