From 0274a7f2f52dc108d5ae6815fb7dcc2af208dc3c Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Fri, 8 Jul 2022 16:46:23 +0200 Subject: Add 3pid unbind callback to module API --- 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 e1a5b6524f..9394be10ad 100644 --- a/docs/modules/third_party_rules_callbacks.md +++ b/docs/modules/third_party_rules_callbacks.md @@ -265,6 +265,24 @@ server_. If multiple modules implement this callback, Synapse runs them all in order. +### `on_threepid_unbind` + +_First introduced in Synapse v1.63.0_ + +```python +async def on_threepid_unbind( + user_id: str, medium: str, address: str, identity_server: str +) -> Tuple[bool, bool]: +``` + +Called before a threepid association is removed. + +It should return a tuple of 2 booleans reporting if a changed happened for the first, and if unbind +needs to stop there for the second (True value). In this case no other module unbind will be +called, and the default unbind made to the IS that was used on bind will also be skipped. +In any case the mapping will be removed from the Synapse 3pid remote table, except if an Exception +was raised at some point. + ## Example The example below is a module that implements the third-party rules callback -- cgit 1.5.1