From a900468b4cee4fcebf92f5f79267bec5d7e3bf17 Mon Sep 17 00:00:00 2001 From: babolivier Date: Fri, 11 Mar 2022 15:15:44 +0000 Subject: [PATCH] deploy: e6a106fd5ebbf30a7c84f8ba09dc903d20213be3 --- develop/print.html | 7 ++++++- develop/sample_config.yaml | 3 ++- develop/searchindex.js | 2 +- develop/searchindex.json | 2 +- develop/templates.html | 4 ++++ develop/usage/configuration/homeserver_sample_config.html | 3 ++- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/develop/print.html b/develop/print.html index 5d25fa6581..57d198ef4b 100644 --- a/develop/print.html +++ b/develop/print.html @@ -4891,7 +4891,8 @@ saml2_config: # localpart_template: Jinja2 template for the localpart of the MXID. # If this is not set, the user will be prompted to choose their # own username (see the documentation for the -# 'sso_auth_account_details.html' template). +# 'sso_auth_account_details.html' template). This template can +# use the 'localpart_from_email' filter. # # confirm_localpart: Whether to prompt the user to validate (or # change) the generated localpart (see the documentation for the @@ -5932,6 +5933,10 @@ already available as part of Jinja 2:

Turns a mxc:// URL for media content into an HTTP(S) one using the homeserver's public_baseurl configuration setting as the URL's base.

Example: message.sender_avatar_url|mxc_to_http(32,32)

+
localpart_from_email(address: str) -> str
+
+

Returns the local part of an email address (e.g. alice in alice@example.com).

+

Example: user.email_address|localpart_from_email

Email templates

Below are the templates Synapse will look for when generating the content of an email: