summary refs log tree commit diff
path: root/synapse/federation
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/federation
parentTest Synapse against Complement with workers. (#12810) (diff)
parentUpdate changelog (diff)
downloadsynapse-3594f6c1f340f12bfcb2fec9e99ac108a714b508.tar.xz
Merge branch 'master' into develop
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_base.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py
index 1e866b19d8..7bc54b9988 100644
--- a/synapse/federation/federation_base.py
+++ b/synapse/federation/federation_base.py
@@ -15,7 +15,6 @@
 import logging
 from typing import TYPE_CHECKING
 
-import synapse
 from synapse.api.constants import MAX_DEPTH, EventContentFields, EventTypes, Membership
 from synapse.api.errors import Codes, SynapseError
 from synapse.api.room_versions import EventFormatVersions, RoomVersion
@@ -101,7 +100,7 @@ class FederationBase:
 
         spam_check = await self.spam_checker.check_event_for_spam(pdu)
 
-        if spam_check is not synapse.spam_checker_api.Allow.ALLOW:
+        if spam_check != self.spam_checker.NOT_SPAM:
             logger.warning("Event contains spam, soft-failing %s", pdu.event_id)
             # we redact (to save disk space) as well as soft-failing (to stop
             # using the event in prev_events).