From 69a3dc72acb1c50de791786234451afff5768176 Mon Sep 17 00:00:00 2001 From: anoadragon453 Date: Mon, 27 Feb 2023 14:20:07 +0000 Subject: deploy: b40657314e03583f45ad49504711698a70735313 --- develop/print.html | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'develop/print.html') diff --git a/develop/print.html b/develop/print.html index 239f78c0d3..4c3048e371 100644 --- a/develop/print.html +++ b/develop/print.html @@ -1779,6 +1779,24 @@ dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb +

Upgrading to v1.79.0

+

The on_threepid_bind module callback method has been deprecated

+

Synapse v1.79.0 deprecates the +on_threepid_bind +"third-party rules" Synapse module callback method in favour of a new module method, +on_add_user_third_party_identifier. +on_threepid_bind will be removed in a future version of Synapse. You should check whether any Synapse +modules in use in your deployment are making use of on_threepid_bind, and update them where possible.

+

The arguments and functionality of the new method are the same.

+

The justification behind the name change is that the old method's name, on_threepid_bind, was +misleading. A user is considered to "bind" their third-party ID to their Matrix ID only if they +do so via an identity server +(so that users on other homeservers may find them). But this method was not called in that case - +it was only called when a user added a third-party identifier on the local homeserver.

+

Module developers may also be interested in the related +on_remove_user_third_party_identifier +module callback method that was also added in Synapse v1.79.0. This new method is called when a +user removes a third-party identifier from their account.

Upgrading to v1.78.0

Deprecate the /_synapse/admin/v1/media/<server_name>/delete admin API

Synapse 1.78.0 replaces the /_synapse/admin/v1/media/<server_name>/delete @@ -9890,6 +9908,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 @@ -9899,6 +9921,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