From 7c5dd6ffb85f208632f7a2018a922b5ef2083c18 Mon Sep 17 00:00:00 2001
From: anoadragon453
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(
--
cgit 1.5.1