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>
This commit is contained in:
Brendan Abolivier
2022-05-31 12:04:53 +02:00
committed by GitHub
co-authored by Richard van der Hoff
parent e409ab8e92
commit 8fd87739bf
8 changed files with 66 additions and 78 deletions
+3 -5
View File
@@ -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",