summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2017-09-27 11:31:00 +0100
committerGitHub <noreply@github.com>2017-09-27 11:31:00 +0100
commit74e494b0101c5ff2bf406c6487f6c36dd67eca49 (patch)
treee2599991593707e460fafd1456655585a0148b82 /synapse/server.py
parentpep8 (diff)
parentDon't test is spam_checker not None (diff)
downloadsynapse-74e494b0101c5ff2bf406c6487f6c36dd67eca49.tar.xz
Merge pull request #2474 from matrix-org/dbkr/spam_check_module
Make the spam checker a module
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index a38e5179e0..4d44af745e 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -31,6 +31,7 @@ from synapse.appservice.api import ApplicationServiceApi
 from synapse.appservice.scheduler import ApplicationServiceScheduler
 from synapse.crypto.keyring import Keyring
 from synapse.events.builder import EventBuilderFactory
+from synapse.events.spamcheck import SpamChecker
 from synapse.federation import initialize_http_replication
 from synapse.federation.send_queue import FederationRemoteSendQueue
 from synapse.federation.transport.client import TransportLayerClient
@@ -139,6 +140,7 @@ class HomeServer(object):
         'read_marker_handler',
         'action_generator',
         'user_directory_handler',
+        'spam_checker',
     ]
 
     def __init__(self, hostname, **kwargs):
@@ -309,6 +311,9 @@ class HomeServer(object):
     def build_user_directory_handler(self):
         return UserDirectoyHandler(self)
 
+    def build_spam_checker(self):
+        return SpamChecker(self)
+
     def remove_pusher(self, app_id, push_key, user_id):
         return self.get_pusherpool().remove_pusher(app_id, push_key, user_id)