summary refs log tree commit diff
path: root/docs/modules/writing_a_module.md
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2021-10-18 18:26:52 +0200
committerGitHub <noreply@github.com>2021-10-18 18:26:52 +0200
commit73743b8ad194c6e833432110b7d0cd1ba2ad1e6a (patch)
tree6280b6d87a7f75c6644b7d2c94c9266f97456849 /docs/modules/writing_a_module.md
parent`_run_push_actions_and_persist_event`: handle no min_depth (#11014) (diff)
downloadsynapse-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/writing_a_module.md')
-rw-r--r--docs/modules/writing_a_module.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/modules/writing_a_module.md b/docs/modules/writing_a_module.md
index 4f2fec8dc9..7764e06692 100644
--- a/docs/modules/writing_a_module.md
+++ b/docs/modules/writing_a_module.md
@@ -12,6 +12,21 @@ configuration associated with the module in Synapse's configuration file.
 See the documentation for the `ModuleApi` class
 [here](https://github.com/matrix-org/synapse/blob/master/synapse/module_api/__init__.py).
 
+## When Synapse runs with several modules configured
+
+If Synapse is running with other modules configured, the order each module appears in
+within the `modules` section of the Synapse configuration file might restrict what it can
+or cannot register. See [this section](index.html#using-multiple-modules) for more
+information.
+
+On top of the rules listed in the link above, if a callback returns a value that should
+cause the current operation to fail (e.g. if a callback checking an event returns with a
+value that should cause the event to be denied), Synapse will fail the operation and
+ignore any subsequent callbacks that should have been run after this one.
+
+The documentation for each callback mentions how Synapse behaves when
+multiple modules implement it.
+
 ## Handling the module's configuration
 
 A module can implement the following static method: