From 2ab69e081674596352f3fd4a2af874fad9abfdcf Mon Sep 17 00:00:00 2001
From: erikjohnston
Date: Wed, 13 Dec 2023 15:42:43 +0000
Subject: deploy: 8613f7693ea284a023dc625c9a35b9ff482f5fd0
---
develop/modules/account_data_callbacks.html | 4 ++--
develop/modules/account_validity_callbacks.html | 4 ++--
.../add_extra_fields_to_client_events_unsigned.html | 4 ++--
.../modules/background_update_controller_callbacks.html | 4 ++--
develop/modules/index.html | 4 ++--
develop/modules/password_auth_provider_callbacks.html | 4 ++--
develop/modules/porting_legacy_module.html | 4 ++--
develop/modules/presence_router_callbacks.html | 4 ++--
develop/modules/spam_checker_callbacks.html | 4 ++--
develop/modules/third_party_rules_callbacks.html | 4 ++--
develop/modules/writing_a_module.html | 16 ++++++++--------
11 files changed, 28 insertions(+), 28 deletions(-)
(limited to 'develop/modules')
diff --git a/develop/modules/account_data_callbacks.html b/develop/modules/account_data_callbacks.html
index 7c63d4c444..39c41a583f 100644
--- a/develop/modules/account_data_callbacks.html
+++ b/develop/modules/account_data_callbacks.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/account_validity_callbacks.html b/develop/modules/account_validity_callbacks.html
index 740f419ddd..69074eb568 100644
--- a/develop/modules/account_validity_callbacks.html
+++ b/develop/modules/account_validity_callbacks.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/add_extra_fields_to_client_events_unsigned.html b/develop/modules/add_extra_fields_to_client_events_unsigned.html
index 88ae9d71f1..046a7bca9c 100644
--- a/develop/modules/add_extra_fields_to_client_events_unsigned.html
+++ b/develop/modules/add_extra_fields_to_client_events_unsigned.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/background_update_controller_callbacks.html b/develop/modules/background_update_controller_callbacks.html
index f2dd53fafd..d743fd2120 100644
--- a/develop/modules/background_update_controller_callbacks.html
+++ b/develop/modules/background_update_controller_callbacks.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/index.html b/develop/modules/index.html
index c4b0678ea8..5b9ad918f5 100644
--- a/develop/modules/index.html
+++ b/develop/modules/index.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/password_auth_provider_callbacks.html b/develop/modules/password_auth_provider_callbacks.html
index fa284dbfe8..db6510f36e 100644
--- a/develop/modules/password_auth_provider_callbacks.html
+++ b/develop/modules/password_auth_provider_callbacks.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/porting_legacy_module.html b/develop/modules/porting_legacy_module.html
index 4dbb66730b..1a5035f265 100644
--- a/develop/modules/porting_legacy_module.html
+++ b/develop/modules/porting_legacy_module.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/presence_router_callbacks.html b/develop/modules/presence_router_callbacks.html
index 05bf729d5f..680ed3d537 100644
--- a/develop/modules/presence_router_callbacks.html
+++ b/develop/modules/presence_router_callbacks.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/spam_checker_callbacks.html b/develop/modules/spam_checker_callbacks.html
index 794bdb18b5..fc1db0a419 100644
--- a/develop/modules/spam_checker_callbacks.html
+++ b/develop/modules/spam_checker_callbacks.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/third_party_rules_callbacks.html b/develop/modules/third_party_rules_callbacks.html
index b04e75e7b5..2866f9d23c 100644
--- a/develop/modules/third_party_rules_callbacks.html
+++ b/develop/modules/third_party_rules_callbacks.html
@@ -124,10 +124,10 @@
-
+
-
+
diff --git a/develop/modules/writing_a_module.html b/develop/modules/writing_a_module.html
index b44dcf2cdc..7a42c64a98 100644
--- a/develop/modules/writing_a_module.html
+++ b/develop/modules/writing_a_module.html
@@ -124,10 +124,10 @@
-
+
-
+
@@ -168,7 +168,7 @@ the synapse.module_api.ModuleApi
class. The configuration is a dict
either the output of the module's parse_config
static method (see below), or the
configuration associated with the module in Synapse's configuration file.
See the documentation for the ModuleApi
class
-here.
+here.
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
@@ -239,7 +239,7 @@ from synapse.module_api import cached, ModuleApi
class MyModule:
def __init__(self, config: Any, api: ModuleApi):
self.api = api
-
+
# Register the cached function so Synapse knows how to correctly invalidate
# entries for it.
self.api.register_cached_function(self.get_user_from_id)
@@ -254,15 +254,15 @@ class MyModule:
async def do_something_with_users(self) -> None:
"""Calls the cached function and then invalidates an entry in its cache."""
-
+
user_id = "@alice:example.com"
-
+
# Get the user. Since get_department_for_user is wrapped with a cache,
# the return value for this user_id will be cached.
department = await self.get_department_for_user(user_id)
-
+
# Do something with `department`...
-
+
# Let's say something has changed with our user, and the entry we have for
# them in the cache is out of date, so we want to invalidate it.
await self.api.invalidate_cache(self.get_department_for_user, (user_id,))
--
cgit 1.5.1