From 7c5dd6ffb85f208632f7a2018a922b5ef2083c18 Mon Sep 17 00:00:00 2001 From: anoadragon453 Date: Tue, 22 Mar 2022 16:30:53 +0000 Subject: deploy: 6b26536a52f77aa5573b4d2afedae448fac31b7c --- latest/modules/account_validity_callbacks.html | 2 +- .../background_update_controller_callbacks.html | 2 +- latest/modules/index.html | 2 +- .../modules/password_auth_provider_callbacks.html | 2 +- latest/modules/porting_legacy_module.html | 2 +- latest/modules/presence_router_callbacks.html | 2 +- latest/modules/spam_checker_callbacks.html | 2 +- latest/modules/third_party_rules_callbacks.html | 31 +++++++++++++++++++++- latest/modules/writing_a_module.html | 2 +- 9 files changed, 38 insertions(+), 9 deletions(-) (limited to 'latest/modules') diff --git a/latest/modules/account_validity_callbacks.html b/latest/modules/account_validity_callbacks.html index 31096f12dd..dcfe9142d3 100644 --- a/latest/modules/account_validity_callbacks.html +++ b/latest/modules/account_validity_callbacks.html @@ -99,7 +99,7 @@ diff --git a/latest/modules/background_update_controller_callbacks.html b/latest/modules/background_update_controller_callbacks.html index 807959d819..285478947a 100644 --- a/latest/modules/background_update_controller_callbacks.html +++ b/latest/modules/background_update_controller_callbacks.html @@ -99,7 +99,7 @@ diff --git a/latest/modules/index.html b/latest/modules/index.html index dd3e4aa2bf..be3ce71bd9 100644 --- a/latest/modules/index.html +++ b/latest/modules/index.html @@ -99,7 +99,7 @@ diff --git a/latest/modules/password_auth_provider_callbacks.html b/latest/modules/password_auth_provider_callbacks.html index 768b702e26..21e8c4c587 100644 --- a/latest/modules/password_auth_provider_callbacks.html +++ b/latest/modules/password_auth_provider_callbacks.html @@ -99,7 +99,7 @@ diff --git a/latest/modules/porting_legacy_module.html b/latest/modules/porting_legacy_module.html index c905abcb5b..72c5b52a8f 100644 --- a/latest/modules/porting_legacy_module.html +++ b/latest/modules/porting_legacy_module.html @@ -99,7 +99,7 @@ diff --git a/latest/modules/presence_router_callbacks.html b/latest/modules/presence_router_callbacks.html index e82340ec1c..e715a63ca7 100644 --- a/latest/modules/presence_router_callbacks.html +++ b/latest/modules/presence_router_callbacks.html @@ -99,7 +99,7 @@ diff --git a/latest/modules/spam_checker_callbacks.html b/latest/modules/spam_checker_callbacks.html index c20d27d114..3ffd3b584b 100644 --- a/latest/modules/spam_checker_callbacks.html +++ b/latest/modules/spam_checker_callbacks.html @@ -99,7 +99,7 @@ diff --git a/latest/modules/third_party_rules_callbacks.html b/latest/modules/third_party_rules_callbacks.html index dc966fbdb8..54ce7ea041 100644 --- a/latest/modules/third_party_rules_callbacks.html +++ b/latest/modules/third_party_rules_callbacks.html @@ -99,7 +99,7 @@ @@ -290,6 +290,35 @@ it will be included in this state.

into the room, which means this callback cannot be used to deny persisting the event. To deny an incoming event, see check_event_for_spam instead.

If multiple modules implement this callback, Synapse runs them all in order.

+

check_can_shutdown_room

+

First introduced in Synapse v1.55.0

+
async def check_can_shutdown_room(
+    user_id: str, room_id: str,
+) -> bool:
+
+

Called when an admin user requests the shutdown of a room. The module must return a +boolean indicating whether the shutdown can go through. If the callback returns False, +the shutdown will not proceed and the caller will see a M_FORBIDDEN error.

+

If multiple modules implement this callback, they will be considered in order. If a +callback returns True, Synapse falls through to the next one. The value of the first +callback that does not return True will be used. If this happens, Synapse will not call +any of the subsequent implementations of this callback.

+

check_can_deactivate_user

+

First introduced in Synapse v1.55.0

+
async def check_can_deactivate_user(
+    user_id: str, by_admin: bool,
+) -> bool:
+
+

Called when the deactivation of a user is requested. User deactivation can be +performed by an admin or the user themselves, so developers are encouraged to check the +requester when implementing this callback. The module must return a +boolean indicating whether the deactivation can go through. If the callback returns False, +the deactivation will not proceed and the caller will see a M_FORBIDDEN error.

+

The module is passed two parameters, user_id which is the ID of the user being deactivated, and by_admin which is True if the request is made by a serve admin, and False otherwise.

+

If multiple modules implement this callback, they will be considered in order. If a +callback returns True, Synapse falls through to the next one. The value of the first +callback that does not return True will be used. If this happens, Synapse will not call +any of the subsequent implementations of this callback.

on_profile_update

First introduced in Synapse v1.54.0

async def on_profile_update(
diff --git a/latest/modules/writing_a_module.html b/latest/modules/writing_a_module.html
index a945d381ce..1a4027d4e8 100644
--- a/latest/modules/writing_a_module.html
+++ b/latest/modules/writing_a_module.html
@@ -99,7 +99,7 @@
 
         
-- 
cgit 1.5.1