diff options
author | Erik Johnston <erik@matrix.org> | 2017-10-23 13:13:53 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-10-23 13:13:53 +0100 |
commit | ffba97807746f6f0d7a8820c0d980f188dcad08c (patch) | |
tree | 36301e98cdc6400afe71b89fc4b0c8beccd0deea /synapse/federation/federation_base.py | |
parent | Merge pull request #2540 from 4nd3r/patch-1 (diff) | |
parent | Bump version and changelog (diff) | |
download | synapse-ffba97807746f6f0d7a8820c0d980f188dcad08c.tar.xz |
Merge branch 'release-v0.24.0' of github.com:matrix-org/synapse v0.24.0
Diffstat (limited to 'synapse/federation/federation_base.py')
-rw-r--r-- | synapse/federation/federation_base.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py index babd9ea078..a0f5d40eb3 100644 --- a/synapse/federation/federation_base.py +++ b/synapse/federation/federation_base.py @@ -16,7 +16,6 @@ import logging from synapse.api.errors import SynapseError from synapse.crypto.event_signing import check_event_content_hash -from synapse.events import spamcheck from synapse.events.utils import prune_event from synapse.util import unwrapFirstError, logcontext from twisted.internet import defer @@ -26,7 +25,7 @@ logger = logging.getLogger(__name__) class FederationBase(object): def __init__(self, hs): - pass + self.spam_checker = hs.get_spam_checker() @defer.inlineCallbacks def _check_sigs_and_hash_and_fetch(self, origin, pdus, outlier=False, @@ -144,7 +143,7 @@ class FederationBase(object): ) return redacted - if spamcheck.check_event_for_spam(pdu): + if self.spam_checker.check_event_for_spam(pdu): logger.warn( "Event contains spam, redacting %s: %s", pdu.event_id, pdu.get_pdu_json() |