This commit is contained in:
hughns committed 2025-09-24 21:44:28 +00:00
1 parent b4d8835e24
commit 2e3cc366a9
4 files changed
+12 -6

No files matched your search

+5 -2
View File
@@ -320,11 +320,14 @@ this callback.</p>
<p><em>Changed in Synapse v1.132.0: Added the <code>room_config</code> argument. Callbacks that only expect a single <code>user_id</code> argument are still supported.</em></p>
<pre><code class="language-python">async def user_may_create_room(user_id: str, room_config: synapse.module_api.JsonDict) -&gt; Union[&quot;synapse.module_api.NOT_SPAM&quot;, &quot;synapse.module_api.errors.Codes&quot;, bool]
</code></pre>
<p>Called when processing a room creation request.</p>
<p>Called when processing a room creation or room upgrade request.</p>
<p>The arguments passed to this callback are:</p>
<ul>
<li><code>user_id</code>: The Matrix user ID of the user (e.g. <code>@alice:example.com</code>).</li>
<li><code>room_config</code>: The contents of the body of a <a href="https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3createroom">/createRoom request</a> as a dictionary.</li>
<li><code>room_config</code>: The contents of the body of the <a href="https://spec.matrix.org/v1.15/client-server-api/#post_matrixclientv3createroom"><code>/createRoom</code> request</a> as a dictionary.
For a <a href="https://spec.matrix.org/v1.15/client-server-api/#post_matrixclientv3roomsroomidupgrade">room upgrade request</a> it is a synthesised subset of what an equivalent
<code>/createRoom</code> request would have looked like. Specifically, it contains the <code>creation_content</code> (linking to the previous room) and <code>initial_state</code> (containing a
subset of the state of the previous room).</li>
</ul>
<p>The callback must return one of:</p>
<ul>
+5 -2
View File
@@ -10629,11 +10629,14 @@ this callback.</p>
<p><em>Changed in Synapse v1.132.0: Added the <code>room_config</code> argument. Callbacks that only expect a single <code>user_id</code> argument are still supported.</em></p>
<pre><code class="language-python">async def user_may_create_room(user_id: str, room_config: synapse.module_api.JsonDict) -&gt; Union[&quot;synapse.module_api.NOT_SPAM&quot;, &quot;synapse.module_api.errors.Codes&quot;, bool]
</code></pre>
<p>Called when processing a room creation request.</p>
<p>Called when processing a room creation or room upgrade request.</p>
<p>The arguments passed to this callback are:</p>
<ul>
<li><code>user_id</code>: The Matrix user ID of the user (e.g. <code>@alice:example.com</code>).</li>
<li><code>room_config</code>: The contents of the body of a <a href="https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3createroom">/createRoom request</a> as a dictionary.</li>
<li><code>room_config</code>: The contents of the body of the <a href="https://spec.matrix.org/v1.15/client-server-api/#post_matrixclientv3createroom"><code>/createRoom</code> request</a> as a dictionary.
For a <a href="https://spec.matrix.org/v1.15/client-server-api/#post_matrixclientv3roomsroomidupgrade">room upgrade request</a> it is a synthesised subset of what an equivalent
<code>/createRoom</code> request would have looked like. Specifically, it contains the <code>creation_content</code> (linking to the previous room) and <code>initial_state</code> (containing a
subset of the state of the previous room).</li>
</ul>
<p>The callback must return one of:</p>
<ul>
+1 -1
View File
@@ -1 +1 @@
Object.assign(window.search, {"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#backups","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#postgresql-major-version-upgrades","postgres.html#backups","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","setup/turn/coturn.html#coturn-turn-server","setup/turn/coturn.html#coturn-setup","setup/turn/coturn.html#initial-installation","setup/turn/coturn.html#configuration","setup/turn/eturnal.html#eturnal-turn-server","setup/turn/eturnal.html#eturnal-setup","setup/turn/eturnal.html#initial-installation","setup/turn/eturnal.html#configuration","setup/turn/eturnal.html#eturnalctl-opterations-script","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-from-a-very-old-version","upgrade.html#upgrading-to-v11390","upgrade.html#register-requests-from-old-application-service-implementations-may-break-when-using-mas","upgrade.html#upgrading-to-v11382","upgrade.html#drop-support-for-ubuntu-2410-oracular-oriole-and-add-support-for-ubuntu-2504-plucky-puffin","upgrade.html#upgrading-to-v11360","upgrade.html#deprecate-run_as_background_process-exported-as-part-of-the-module-api-interface-in-favor-of-moduleapirun_as_background_process","upgrade.html#metric-labels-have-changed-on-synapse_federation_last_received_pdu_time-and-synapse_federation_last_sent_pdu_time","upgrade.html#stable-integration-with-matrix-authentication-service","upgrade.html#upgrading-to-v11350","upgrade.html#on_user_registration-module-api-callback-may-now-run-on-any-worker","upgrade.html#upgrading-to-v11340","upgrade.html#icu-bundled-with-synapse","upgrade.html#upgrading-to-v11300","upgrade.html#documented-endpoint-which-can-be-delegated-to-a-federation-worker","upgrade.html#upgrading-to-v11260","upgrade.html#room-list-publication-rules-change","upgrade.html#change-of-signing-key-expiry-date-for-the-debianubuntu-package-repository","upgrade.html#upgrading-to-v11220","upgrade.html#dropping-support-for-postgresql-11-and-12","upgrade.html#upgrading-to-v11200","upgrade.html#removal-of-experimental-msc3886-feature","upgrade.html#authenticated-media-is-now-enforced-by-default","upgrade.html#upgrading-to-v11190","upgrade.html#minimum-supported-python-version","upgrade.html#upgrading-to-v11110","upgrade.html#new-worker-endpoints-for-authenticated-client-and-federation-media","upgrade.html#upgrading-to-v11060","upgrade.html#minimum-supported-rust-version","upgrade.html#upgrading-to-v11000","upgrade.html#minimum-supported-rust-version-1","upgrade.html#upgrading-to-v1930","upgrade.html#minimum-supported-rust-version-2","upgrade.html#upgrading-to-v1900","upgrade.html#app-service-query-parameter-authorization-is-now-a-configuration-option","upgrade.html#upgradiLine truncated
Object.assign(window.search, {"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#backups","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#postgresql-major-version-upgrades","postgres.html#backups","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","setup/turn/coturn.html#coturn-turn-server","setup/turn/coturn.html#coturn-setup","setup/turn/coturn.html#initial-installation","setup/turn/coturn.html#configuration","setup/turn/eturnal.html#eturnal-turn-server","setup/turn/eturnal.html#eturnal-setup","setup/turn/eturnal.html#initial-installation","setup/turn/eturnal.html#configuration","setup/turn/eturnal.html#eturnalctl-opterations-script","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-from-a-very-old-version","upgrade.html#upgrading-to-v11390","upgrade.html#register-requests-from-old-application-service-implementations-may-break-when-using-mas","upgrade.html#upgrading-to-v11382","upgrade.html#drop-support-for-ubuntu-2410-oracular-oriole-and-add-support-for-ubuntu-2504-plucky-puffin","upgrade.html#upgrading-to-v11360","upgrade.html#deprecate-run_as_background_process-exported-as-part-of-the-module-api-interface-in-favor-of-moduleapirun_as_background_process","upgrade.html#metric-labels-have-changed-on-synapse_federation_last_received_pdu_time-and-synapse_federation_last_sent_pdu_time","upgrade.html#stable-integration-with-matrix-authentication-service","upgrade.html#upgrading-to-v11350","upgrade.html#on_user_registration-module-api-callback-may-now-run-on-any-worker","upgrade.html#upgrading-to-v11340","upgrade.html#icu-bundled-with-synapse","upgrade.html#upgrading-to-v11300","upgrade.html#documented-endpoint-which-can-be-delegated-to-a-federation-worker","upgrade.html#upgrading-to-v11260","upgrade.html#room-list-publication-rules-change","upgrade.html#change-of-signing-key-expiry-date-for-the-debianubuntu-package-repository","upgrade.html#upgrading-to-v11220","upgrade.html#dropping-support-for-postgresql-11-and-12","upgrade.html#upgrading-to-v11200","upgrade.html#removal-of-experimental-msc3886-feature","upgrade.html#authenticated-media-is-now-enforced-by-default","upgrade.html#upgrading-to-v11190","upgrade.html#minimum-supported-python-version","upgrade.html#upgrading-to-v11110","upgrade.html#new-worker-endpoints-for-authenticated-client-and-federation-media","upgrade.html#upgrading-to-v11060","upgrade.html#minimum-supported-rust-version","upgrade.html#upgrading-to-v11000","upgrade.html#minimum-supported-rust-version-1","upgrade.html#upgrading-to-v1930","upgrade.html#minimum-supported-rust-version-2","upgrade.html#upgrading-to-v1900","upgrade.html#app-service-query-parameter-authorization-is-now-a-configuration-option","upgrade.html#upgradiLine truncated
+1 -1
View File
@@ -1 +1 @@
{"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#backups","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#postgresql-major-version-upgrades","postgres.html#backups","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","setup/turn/coturn.html#coturn-turn-server","setup/turn/coturn.html#coturn-setup","setup/turn/coturn.html#initial-installation","setup/turn/coturn.html#configuration","setup/turn/eturnal.html#eturnal-turn-server","setup/turn/eturnal.html#eturnal-setup","setup/turn/eturnal.html#initial-installation","setup/turn/eturnal.html#configuration","setup/turn/eturnal.html#eturnalctl-opterations-script","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-from-a-very-old-version","upgrade.html#upgrading-to-v11390","upgrade.html#register-requests-from-old-application-service-implementations-may-break-when-using-mas","upgrade.html#upgrading-to-v11382","upgrade.html#drop-support-for-ubuntu-2410-oracular-oriole-and-add-support-for-ubuntu-2504-plucky-puffin","upgrade.html#upgrading-to-v11360","upgrade.html#deprecate-run_as_background_process-exported-as-part-of-the-module-api-interface-in-favor-of-moduleapirun_as_background_process","upgrade.html#metric-labels-have-changed-on-synapse_federation_last_received_pdu_time-and-synapse_federation_last_sent_pdu_time","upgrade.html#stable-integration-with-matrix-authentication-service","upgrade.html#upgrading-to-v11350","upgrade.html#on_user_registration-module-api-callback-may-now-run-on-any-worker","upgrade.html#upgrading-to-v11340","upgrade.html#icu-bundled-with-synapse","upgrade.html#upgrading-to-v11300","upgrade.html#documented-endpoint-which-can-be-delegated-to-a-federation-worker","upgrade.html#upgrading-to-v11260","upgrade.html#room-list-publication-rules-change","upgrade.html#change-of-signing-key-expiry-date-for-the-debianubuntu-package-repository","upgrade.html#upgrading-to-v11220","upgrade.html#dropping-support-for-postgresql-11-and-12","upgrade.html#upgrading-to-v11200","upgrade.html#removal-of-experimental-msc3886-feature","upgrade.html#authenticated-media-is-now-enforced-by-default","upgrade.html#upgrading-to-v11190","upgrade.html#minimum-supported-python-version","upgrade.html#upgrading-to-v11110","upgrade.html#new-worker-endpoints-for-authenticated-client-and-federation-media","upgrade.html#upgrading-to-v11060","upgrade.html#minimum-supported-rust-version","upgrade.html#upgrading-to-v11000","upgrade.html#minimum-supported-rust-version-1","upgrade.html#upgrading-to-v1930","upgrade.html#minimum-supported-rust-version-2","upgrade.html#upgrading-to-v1900","upgrade.html#app-service-query-parameter-authorization-is-now-a-configuration-option","upgrade.html#upgrading-to-v1890","upgrade.html#reLine truncated
{"doc_urls":["welcome_and_overview.html#introduction","welcome_and_overview.html#installing-and-using-synapse","welcome_and_overview.html#developing-on-synapse","welcome_and_overview.html#reporting-a-security-vulnerability","setup/installation.html#installation-instructions","setup/installation.html#choosing-your-server-name","setup/installation.html#installing-synapse","setup/installation.html#prebuilt-packages","setup/installation.html#installing-as-a-python-module-from-pypi","setup/installation.html#setting-up-synapse","setup/installation.html#using-postgresql","setup/installation.html#tls-certificates","setup/installation.html#client-well-known-uri","setup/installation.html#email","setup/installation.html#registering-a-user","setup/installation.html#setting-up-a-turn-server","setup/installation.html#url-previews","setup/installation.html#backups","setup/installation.html#troubleshooting-installation","postgres.html#using-postgres","postgres.html#install-postgres-client-libraries","postgres.html#set-up-database","postgres.html#synapse-config","postgres.html#postgresql-major-version-upgrades","postgres.html#backups","postgres.html#tuning-postgres","postgres.html#porting-from-sqlite","postgres.html#overview","postgres.html#using-the-port-script","postgres.html#troubleshooting","postgres.html#alternative-auth-methods","postgres.html#fixing-incorrect-collate-or-ctype","reverse_proxy.html#using-a-reverse-proxy-with-synapse","reverse_proxy.html#homeserver-configuration","reverse_proxy.html#reverse-proxy-configuration-examples","reverse_proxy.html#nginx","reverse_proxy.html#caddy-v2","reverse_proxy.html#apache","reverse_proxy.html#haproxy","reverse_proxy.html#relayd","reverse_proxy.html#health-check-endpoint","reverse_proxy.html#synapse-administration-endpoints","setup/forward_proxy.html#using-a-forward-proxy-with-synapse","setup/forward_proxy.html#configure","setup/forward_proxy.html#connection-types","setup/forward_proxy.html#troubleshooting","turn-howto.html#overview","turn-howto.html#requirements","turn-howto.html#synapse-setup","turn-howto.html#troubleshooting","setup/turn/coturn.html#coturn-turn-server","setup/turn/coturn.html#coturn-setup","setup/turn/coturn.html#initial-installation","setup/turn/coturn.html#configuration","setup/turn/eturnal.html#eturnal-turn-server","setup/turn/eturnal.html#eturnal-setup","setup/turn/eturnal.html#initial-installation","setup/turn/eturnal.html#configuration","setup/turn/eturnal.html#eturnalctl-opterations-script","delegate.html#delegation-of-incoming-federation-traffic","delegate.html#well-known-delegation","delegate.html#external-server","delegate.html#serving-a-well-knownmatrixserver-file-with-synapse","delegate.html#srv-dns-record-delegation","delegate.html#delegation-faq","delegate.html#when-do-i-need-delegation","delegate.html#should-i-use-a-reverse-proxy-for-federation-traffic","upgrade.html#upgrading-synapse","upgrade.html#rolling-back-to-older-versions","upgrade.html#upgrading-from-a-very-old-version","upgrade.html#upgrading-to-v11390","upgrade.html#register-requests-from-old-application-service-implementations-may-break-when-using-mas","upgrade.html#upgrading-to-v11382","upgrade.html#drop-support-for-ubuntu-2410-oracular-oriole-and-add-support-for-ubuntu-2504-plucky-puffin","upgrade.html#upgrading-to-v11360","upgrade.html#deprecate-run_as_background_process-exported-as-part-of-the-module-api-interface-in-favor-of-moduleapirun_as_background_process","upgrade.html#metric-labels-have-changed-on-synapse_federation_last_received_pdu_time-and-synapse_federation_last_sent_pdu_time","upgrade.html#stable-integration-with-matrix-authentication-service","upgrade.html#upgrading-to-v11350","upgrade.html#on_user_registration-module-api-callback-may-now-run-on-any-worker","upgrade.html#upgrading-to-v11340","upgrade.html#icu-bundled-with-synapse","upgrade.html#upgrading-to-v11300","upgrade.html#documented-endpoint-which-can-be-delegated-to-a-federation-worker","upgrade.html#upgrading-to-v11260","upgrade.html#room-list-publication-rules-change","upgrade.html#change-of-signing-key-expiry-date-for-the-debianubuntu-package-repository","upgrade.html#upgrading-to-v11220","upgrade.html#dropping-support-for-postgresql-11-and-12","upgrade.html#upgrading-to-v11200","upgrade.html#removal-of-experimental-msc3886-feature","upgrade.html#authenticated-media-is-now-enforced-by-default","upgrade.html#upgrading-to-v11190","upgrade.html#minimum-supported-python-version","upgrade.html#upgrading-to-v11110","upgrade.html#new-worker-endpoints-for-authenticated-client-and-federation-media","upgrade.html#upgrading-to-v11060","upgrade.html#minimum-supported-rust-version","upgrade.html#upgrading-to-v11000","upgrade.html#minimum-supported-rust-version-1","upgrade.html#upgrading-to-v1930","upgrade.html#minimum-supported-rust-version-2","upgrade.html#upgrading-to-v1900","upgrade.html#app-service-query-parameter-authorization-is-now-a-configuration-option","upgrade.html#upgrading-to-v1890","upgrade.html#reLine truncated