From abd2bf371ec0ec7d76453ed75006817bb3fd8c84 Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Thu, 7 Dec 2023 10:47:46 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Patrick Cloke --- docs/usage/configuration/config_documentation.md | 7 +++++-- synapse/config/emailconfig.py | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 3c74984d9206..491abef0a75c 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -663,8 +663,11 @@ This setting has the following sub-options: has missed. Disabled by default. * `notif_for_new_users`: Set to false to disable automatic subscription to email notifications for new users. Enabled by default. -* `delay_before_mail`: Time we always wait before ever emailing about a notification - (to give the user a chance to respond to other push or notice the window). Defaults to 10 minutes. +* `delay_before_mail`: The time to wait before emailing about a notification. + This gives the user a chance to view the message via push or an open client. + Defaults to 10 minutes. + + *New in Synapse 1.98.0._ * `client_base_url`: Custom URL for client links within the email notifications. By default links will be based on "https://matrix.to". (This setting used to be called `riot_base_url`; the old name is still supported for backwards-compatibility but is now deprecated.) diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py index c085b63cfe10..5f2723c22f3f 100644 --- a/synapse/config/emailconfig.py +++ b/synapse/config/emailconfig.py @@ -294,6 +294,8 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None: self.email_riot_base_url = email_config.get( "client_base_url", email_config.get("riot_base_url", None) ) + # The amount of time we always wait before ever emailing about a notification + # (to give the user a chance to respond to other push or notice the window) self.delay_before_mail_ms = Config.parse_duration( email_config.get("delay_before_mail", "10m") )