From be2eae9d228193320cd8a4fa696505c6efb6772c Mon Sep 17 00:00:00 2001 From: squahtx Date: Tue, 7 Dec 2021 16:19:22 +0000 Subject: deploy: 26b5d2320f62b5eb6262c7614fbdfc364a4dfc02 --- latest/modules/writing_a_module.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'latest/modules/writing_a_module.html') diff --git a/latest/modules/writing_a_module.html b/latest/modules/writing_a_module.html index 9a68176b93..dd31ddee78 100644 --- a/latest/modules/writing_a_module.html +++ b/latest/modules/writing_a_module.html @@ -99,7 +99,7 @@ @@ -233,14 +233,14 @@ configuration file takes priority.

Modules must register their web resources in their __init__ method.

Registering a callback

Modules can use Synapse's module API to register callbacks. Callbacks are functions that -Synapse will call when performing specific actions. Callbacks must be asynchronous, and -are split in categories. A single module may implement callbacks from multiple categories, -and is under no obligation to implement all callbacks from the categories it registers -callbacks for.

+Synapse will call when performing specific actions. Callbacks must be asynchronous (unless +specified otherwise), and are split in categories. A single module may implement callbacks +from multiple categories, and is under no obligation to implement all callbacks from the +categories it registers callbacks for.

Modules can register callbacks using one of the module API's register_[...]_callbacks methods. The callback functions are passed to these methods as keyword arguments, with -the callback name as the argument name and the function as its value. This is demonstrated -in the example below. A register_[...]_callbacks method exists for each category.

+the callback name as the argument name and the function as its value. A +register_[...]_callbacks method exists for each category.

Callbacks for each category can be found on their respective page of the Synapse documentation website.

-- cgit 1.5.1