summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2022-03-03 11:39:58 +0100
committerGitHub <noreply@github.com>2022-03-03 11:39:58 +0100
commitae8a616b4926a005cd73db835a1ebcea4f5cbee0 (patch)
tree3e31c0732c0a0a2ed353036c9cb8dc327f6aa48f /synapse/events
parentMake release script write correct no-op changelog (#12127) (diff)
downloadsynapse-ae8a616b4926a005cd73db835a1ebcea4f5cbee0.tar.xz
Correctly register deactivation and profile update module callbacks (#12141)
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/third_party_rules.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/events/third_party_rules.py b/synapse/events/third_party_rules.py
index dd3104faf3..ede72ee876 100644
--- a/synapse/events/third_party_rules.py
+++ b/synapse/events/third_party_rules.py
@@ -174,7 +174,9 @@ class ThirdPartyEventRules:
         ] = None,
         on_new_event: Optional[ON_NEW_EVENT_CALLBACK] = None,
         on_profile_update: Optional[ON_PROFILE_UPDATE_CALLBACK] = None,
-        on_deactivation: Optional[ON_USER_DEACTIVATION_STATUS_CHANGED_CALLBACK] = None,
+        on_user_deactivation_status_changed: Optional[
+            ON_USER_DEACTIVATION_STATUS_CHANGED_CALLBACK
+        ] = None,
     ) -> None:
         """Register callbacks from modules for each hook."""
         if check_event_allowed is not None:
@@ -199,8 +201,10 @@ class ThirdPartyEventRules:
         if on_profile_update is not None:
             self._on_profile_update_callbacks.append(on_profile_update)
 
-        if on_deactivation is not None:
-            self._on_user_deactivation_status_changed_callbacks.append(on_deactivation)
+        if on_user_deactivation_status_changed is not None:
+            self._on_user_deactivation_status_changed_callbacks.append(
+                on_user_deactivation_status_changed,
+            )
 
     async def check_event_allowed(
         self, event: EventBase, context: EventContext