summary refs log tree commit diff
path: root/docs/modules/third_party_rules_callbacks.md
diff options
context:
space:
mode:
authorMathieu Velten <matmaul@gmail.com>2022-07-08 16:46:23 +0200
committerMathieu Velten <mathieuv@matrix.org>2022-08-03 14:52:20 +0200
commit0274a7f2f52dc108d5ae6815fb7dcc2af208dc3c (patch)
treead5e7af83959a2452f7e00ffe333ef6ec0c4badd /docs/modules/third_party_rules_callbacks.md
parentReturn 404 or member list when getting joined_members after leaving (#13374) (diff)
downloadsynapse-0274a7f2f52dc108d5ae6815fb7dcc2af208dc3c.tar.xz
Add 3pid unbind callback to module API
Diffstat (limited to 'docs/modules/third_party_rules_callbacks.md')
-rw-r--r--docs/modules/third_party_rules_callbacks.md18
1 files changed, 18 insertions, 0 deletions
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