diff options
author | Adrian Perez de Castro <aperez@igalia.com> | 2017-01-13 17:12:04 +0200 |
---|---|---|
committer | Adrian Perez de Castro <aperez@igalia.com> | 2017-01-13 17:12:04 +0200 |
commit | a3e4a198e3f5e0acd91d40d5743f97ece2cf5b6f (patch) | |
tree | 473d33f9a3afcf53b261ac02b41dfbd044e88adf /synapse/config | |
parent | Merge pull request #1795 from matrix-org/erikj/port_defaults (diff) | |
download | synapse-a3e4a198e3f5e0acd91d40d5743f97ece2cf5b6f.tar.xz |
Allow configuring the Riot URL used in notification emails
The URLs used for notification emails were hardcoded to use either matrix.to or vector.im; but for self-hosted setups where Riot is also self-hosted it may be desirable to allow configuring an alternative Riot URL. Fixes #1809. Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/emailconfig.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py index a187161272..0030b5db1e 100644 --- a/synapse/config/emailconfig.py +++ b/synapse/config/emailconfig.py @@ -68,6 +68,9 @@ class EmailConfig(Config): self.email_notif_for_new_users = email_config.get( "notif_for_new_users", True ) + self.email_riot_base_url = email_config.get( + "riot_base_url", None + ) if "app_name" in email_config: self.email_app_name = email_config["app_name"] else: @@ -85,6 +88,9 @@ class EmailConfig(Config): def default_config(self, config_dir_path, server_name, **kwargs): return """ # Enable sending emails for notification events + # Defining a custom URL for Riot is only needed if email notifications + # should contain links to a self-hosted installation of Riot; when set + # the "app_name" setting is ignored. #email: # enable_notifs: false # smtp_host: "localhost" @@ -95,4 +101,5 @@ class EmailConfig(Config): # notif_template_html: notif_mail.html # notif_template_text: notif_mail.txt # notif_for_new_users: True + # riot_base_url: "http://localhost/riot" """ |