diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2021-07-20 12:39:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 12:39:46 +0200 |
commit | a743bf46949e851c9a10d8e01a138659f3af2484 (patch) | |
tree | fc6fe51e777b197c83d3aef49011fe13d35b7130 /synapse/module_api/__init__.py | |
parent | Fix exception when failing to get remote room list (#10414) (diff) | |
download | synapse-a743bf46949e851c9a10d8e01a138659f3af2484.tar.xz |
Port the ThirdPartyEventRules module interface to the new generic interface (#10386)
Port the third-party event rules interface to the generic module interface introduced in v1.37.0
Diffstat (limited to 'synapse/module_api/__init__.py')
-rw-r--r-- | synapse/module_api/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index 5df9349134..1259fc2d90 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py @@ -110,6 +110,7 @@ class ModuleApi: self._spam_checker = hs.get_spam_checker() self._account_validity_handler = hs.get_account_validity_handler() + self._third_party_event_rules = hs.get_third_party_event_rules() ################################################################################# # The following methods should only be called during the module's initialisation. @@ -124,6 +125,11 @@ class ModuleApi: """Registers callbacks for account validity capabilities.""" return self._account_validity_handler.register_account_validity_callbacks + @property + def register_third_party_rules_callbacks(self): + """Registers callbacks for third party event rules capabilities.""" + return self._third_party_event_rules.register_third_party_rules_callbacks + def register_web_resource(self, path: str, resource: IResource): """Registers a web resource to be served at the given path. |