Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix import in module_api module and docs on the new check_event_for_spam signature #12918

Merged
merged 16 commits into from
May 31, 2022
Merged
1 change: 1 addition & 0 deletions changelog.d/12918.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.60.0rc1 that would prevent importing the `Allow` type from `synapse.module_api`.
babolivier marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions synapse/module_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
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 (
Expand Down Expand Up @@ -101,6 +100,7 @@
)
from synapse.metrics.background_process_metrics import run_as_background_process
from synapse.rest.client.login import LoginResponse
from synapse.spam_checker_api import Allow
from synapse.storage import DataStore
from synapse.storage.background_updates import (
DEFAULT_BATCH_SIZE_CALLBACK,
Expand Down Expand Up @@ -141,7 +141,7 @@

PRESENCE_ALL_USERS = PresenceRouter.ALL_USERS

ALLOW = spam_checker_api.Allow.ALLOW
ALLOW = Allow.ALLOW
richvdh marked this conversation as resolved.
Show resolved Hide resolved
# Singleton value used to mark a message as permitted.

__all__ = [
Expand Down