diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2021-10-18 18:26:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-18 18:26:52 +0200 |
commit | 73743b8ad194c6e833432110b7d0cd1ba2ad1e6a (patch) | |
tree | 6280b6d87a7f75c6644b7d2c94c9266f97456849 /docs/modules/account_validity_callbacks.md | |
parent | `_run_push_actions_and_persist_event`: handle no min_depth (#11014) (diff) | |
download | synapse-73743b8ad194c6e833432110b7d0cd1ba2ad1e6a.tar.xz |
Document Synapse's behaviour when dealing with multiple modules (#11096)
Document Synapse's behaviour when multiple modules register the same callback/web resource/etc. Co-authored-by: reivilibre <oliverw@matrix.org>
Diffstat (limited to 'docs/modules/account_validity_callbacks.md')
-rw-r--r-- | docs/modules/account_validity_callbacks.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/modules/account_validity_callbacks.md b/docs/modules/account_validity_callbacks.md index 80684b7828..836bda70bf 100644 --- a/docs/modules/account_validity_callbacks.md +++ b/docs/modules/account_validity_callbacks.md @@ -22,6 +22,11 @@ If the module returns `True`, the current request will be denied with the error `ORG_MATRIX_EXPIRED_ACCOUNT` and the HTTP status code 403. Note that this doesn't invalidate the user's access token. +If multiple modules implement this callback, they will be considered in order. If a +callback returns `None`, Synapse falls through to the next one. The value of the first +callback that does not return `None` will be used. If this happens, Synapse will not call +any of the subsequent implementations of this callback. + ### `on_user_registration` ```python @@ -31,3 +36,5 @@ async def on_user_registration(user: str) -> None Called after successfully registering a user, in case the module needs to perform extra operations to keep track of them. (e.g. add them to a database table). The user is represented by their Matrix user ID. + +If multiple modules implement this callback, Synapse runs them all in order. |