diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2022-05-31 12:04:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 12:04:53 +0200 |
commit | 8fd87739bf9653a77fff9669d4f307e8b1bcd1eb (patch) | |
tree | f0b209980fdb2c0818320b7e91ba0a7a95530e5c /synapse/module_api | |
parent | 1.60.0rc2 (diff) | |
download | synapse-8fd87739bf9653a77fff9669d4f307e8b1bcd1eb.tar.xz |
Fix import in module_api module and docs on the new check_event_for_spam signature (#12918)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Diffstat (limited to 'synapse/module_api')
-rw-r--r-- | synapse/module_api/__init__.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index 95f3b27927..c44e9da121 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", |