summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2017-09-26 19:20:23 +0100
committerDavid Baker <dave@matrix.org>2017-09-26 19:20:23 +0100
commit6cd5fcd5366cfef4959d107e818d0e20d78aa483 (patch)
tree4cc7a369317898d4eac75d7cd960ab3a34c78105 /synapse/server.py
parentMerge pull request #2473 from matrix-org/dbkr/factor_out_module_loading (diff)
downloadsynapse-6cd5fcd5366cfef4959d107e818d0e20d78aa483.tar.xz
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)