From 5e88143dff7aa6f8682bd6182e946b3470d1728e Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Thu, 31 Mar 2022 18:27:21 +0200 Subject: Add a callback to react to 3PID associations (#12302) --- docs/modules/third_party_rules_callbacks.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs/modules') diff --git a/docs/modules/third_party_rules_callbacks.md b/docs/modules/third_party_rules_callbacks.md index 1d3c39967f..e1a5b6524f 100644 --- a/docs/modules/third_party_rules_callbacks.md +++ b/docs/modules/third_party_rules_callbacks.md @@ -247,6 +247,24 @@ admin API. If multiple modules implement this callback, Synapse runs them all in order. +### `on_threepid_bind` + +_First introduced in Synapse v1.56.0_ + +```python +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 +(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. + +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. + ## Example The example below is a module that implements the third-party rules callback -- cgit 1.4.1