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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/account_data_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/account_data_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/account_validity_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/account_validity_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/add_extra_fields_to_client_events_unsigned.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/add_extra_fields_to_client_events_unsigned.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/background_update_controller_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/background_update_controller_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/index.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/index.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/password_auth_provider_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/password_auth_provider_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/porting_legacy_module.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/porting_legacy_module.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/presence_router_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/presence_router_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/spam_checker_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/spam_checker_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/third_party_rules_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/third_party_rules_callbacks.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
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 @@
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
- <a href="https://github.com/matrix-org/synapse" title="Git repository" aria-label="Git repository">
+ <a href="https://github.com/element-hq/synapse" title="Git repository" aria-label="Git repository">
<i id="git-repository-button" class="fa fa-github"></i>
</a>
- <a href="https://github.com/matrix-org/synapse/edit/develop/docs/modules/writing_a_module.md" title="Suggest an edit" aria-label="Suggest an edit">
+ <a href="https://github.com/element-hq/synapse/edit/develop/docs/modules/writing_a_module.md" title="Suggest an edit" aria-label="Suggest an edit">
<i id="git-edit-button" class="fa fa-edit"></i>
</a>
</div>
@@ -168,7 +168,7 @@ the <code>synapse.module_api.ModuleApi</code> class. The configuration is a dict
either the output of the module's <code>parse_config</code> static method (see below), or the
configuration associated with the module in Synapse's configuration file.</p>
<p>See the documentation for the <code>ModuleApi</code> class
-<a href="https://github.com/matrix-org/synapse/blob/master/synapse/module_api/__init__.py">here</a>.</p>
+<a href="https://github.com/element.-hq/synapse/blob/master/synapse/module_api/__init__.py">here</a>.</p>
<h2 id="when-synapse-runs-with-several-modules-configured"><a class="header" href="#when-synapse-runs-with-several-modules-configured">When Synapse runs with several modules configured</a></h2>
<p>If Synapse is running with other modules configured, the order each module appears in
within the <code>modules</code> 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,))
|