diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-06-12 10:31:37 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-06-14 18:16:03 +0100 |
commit | f874b16b2e7208d3a202283c085340196d065560 (patch) | |
tree | c3b9bce86873f5b11b6cfdcea1b6edf7dbe997f0 /synapse/server.py | |
parent | 1.0.0rc3 (diff) | |
download | synapse-f874b16b2e7208d3a202283c085340196d065560.tar.xz |
Add plugin APIs for implementations of custom event rules.
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py index 9229a68a8d..a54e023cc9 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd +# Copyright 2017-2018 New Vector Ltd +# Copyright 2019 The Matrix.org Foundation C.I.C. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,6 +37,7 @@ from synapse.crypto import context_factory from synapse.crypto.keyring import Keyring from synapse.events.builder import EventBuilderFactory from synapse.events.spamcheck import SpamChecker +from synapse.events.third_party_rules import ThirdPartyEventRules from synapse.events.utils import EventClientSerializer from synapse.federation.federation_client import FederationClient from synapse.federation.federation_server import ( @@ -178,6 +181,7 @@ class HomeServer(object): 'groups_attestation_renewer', 'secrets', 'spam_checker', + 'third_party_event_rules', 'room_member_handler', 'federation_registry', 'server_notices_manager', @@ -483,6 +487,9 @@ class HomeServer(object): def build_spam_checker(self): return SpamChecker(self) + def build_third_party_event_rules(self): + return ThirdPartyEventRules(self) + def build_room_member_handler(self): if self.config.worker_app: return RoomMemberWorkerHandler(self) |