From 894ac30a4e44e53a8116e6597f74a0d58ae495c6 Mon Sep 17 00:00:00 2001 From: MatMaul Date: Tue, 14 Mar 2023 16:43:55 +0000 Subject: deploy: 8b1af08c6ed141101d127bcf9909f23b2b621510 --- latest/modules/third_party_rules_callbacks.html | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'latest/modules/third_party_rules_callbacks.html') diff --git a/latest/modules/third_party_rules_callbacks.html b/latest/modules/third_party_rules_callbacks.html index db3980be83..43f97fa055 100644 --- a/latest/modules/third_party_rules_callbacks.html +++ b/latest/modules/third_party_rules_callbacks.html @@ -253,6 +253,8 @@ it will be included in this state.

Note that this callback is called when the event has already been processed and stored 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.

+

For any given event, this callback will be called on every worker process, even if that worker will not end up +acting on that event. This callback will not be called for events that are marked as rejected.

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

check_can_shutdown_room

First introduced in Synapse v1.55.0

@@ -327,6 +329,10 @@ admin API.

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

on_threepid_bind

First introduced in Synapse v1.56.0

+

+This callback is deprecated in favour of the on_add_user_third_party_identifier callback, which +features the same functionality. The only difference is in name. +

async def on_threepid_bind(user_id: str, medium: str, address: str) -> None:
 

Called after creating an association between a local user and a third-party identifier @@ -336,6 +342,28 @@ third-party identifier.

Note that this callback is not called after a successful association on an identity server.

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

+

on_add_user_third_party_identifier

+

First introduced in Synapse v1.79.0

+
async def on_add_user_third_party_identifier(user_id: str, medium: str, address: str) -> None:
+
+

Called after successfully creating an association between a user and a third-party identifier +(email address, phone number). The module is given the Matrix ID of the user the +association is for, as well as the medium (email or msisdn) and address of the +third-party identifier (i.e. an email address).

+

Note that this callback is not called if a user attempts to bind their third-party identifier +to an identity server (via a call to POST /_matrix/client/v3/account/3pid/bind).

+

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

+

on_remove_user_third_party_identifier

+

First introduced in Synapse v1.79.0

+
async def on_remove_user_third_party_identifier(user_id: str, medium: str, address: str) -> None:
+
+

Called after successfully removing an association between a user and a third-party identifier +(email address, phone number). The module is given the Matrix ID of the user the +association is for, as well as the medium (email or msisdn) and address of the +third-party identifier (i.e. an email address).

+

Note that this callback is not called if a user attempts to unbind their third-party +identifier from an identity server (via a call to POST /_matrix/client/v3/account/3pid/unbind).

+

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

Example

The example below is a module that implements the third-party rules callback check_event_allowed to censor incoming messages as dictated by a third-party service.

-- cgit 1.5.1