mirror of
https://github.com/matrix-org/synapse.git
synced 2025-02-21 22:55:48 +00:00
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
This commit is contained in:
commit
0cbdfcbb75
@ -71,6 +71,15 @@ class EmailConfig(Config):
|
|||||||
self.email_riot_base_url = email_config.get(
|
self.email_riot_base_url = email_config.get(
|
||||||
"riot_base_url", None
|
"riot_base_url", None
|
||||||
)
|
)
|
||||||
|
self.email_smtp_user = email_config.get(
|
||||||
|
"smtp_user", None
|
||||||
|
)
|
||||||
|
self.email_smtp_pass = email_config.get(
|
||||||
|
"smtp_pass", None
|
||||||
|
)
|
||||||
|
self.require_transport_security = email_config.get(
|
||||||
|
"require_transport_security", False
|
||||||
|
)
|
||||||
if "app_name" in email_config:
|
if "app_name" in email_config:
|
||||||
self.email_app_name = email_config["app_name"]
|
self.email_app_name = email_config["app_name"]
|
||||||
else:
|
else:
|
||||||
@ -91,10 +100,17 @@ class EmailConfig(Config):
|
|||||||
# Defining a custom URL for Riot is only needed if email notifications
|
# Defining a custom URL for Riot is only needed if email notifications
|
||||||
# should contain links to a self-hosted installation of Riot; when set
|
# should contain links to a self-hosted installation of Riot; when set
|
||||||
# the "app_name" setting is ignored.
|
# the "app_name" setting is ignored.
|
||||||
|
#
|
||||||
|
# If your SMTP server requires authentication, the optional smtp_user &
|
||||||
|
# smtp_pass variables should be used
|
||||||
|
#
|
||||||
#email:
|
#email:
|
||||||
# enable_notifs: false
|
# enable_notifs: false
|
||||||
# smtp_host: "localhost"
|
# smtp_host: "localhost"
|
||||||
# smtp_port: 25
|
# smtp_port: 25
|
||||||
|
# smtp_user: "exampleusername"
|
||||||
|
# smtp_pass: "examplepassword"
|
||||||
|
# require_transport_security: False
|
||||||
# notif_from: "Your Friendly %(app)s Home Server <noreply@example.com>"
|
# notif_from: "Your Friendly %(app)s Home Server <noreply@example.com>"
|
||||||
# app_name: Matrix
|
# app_name: Matrix
|
||||||
# template_dir: res/templates
|
# template_dir: res/templates
|
||||||
|
@ -69,6 +69,7 @@ class RegistrationConfig(Config):
|
|||||||
trusted_third_party_id_servers:
|
trusted_third_party_id_servers:
|
||||||
- matrix.org
|
- matrix.org
|
||||||
- vector.im
|
- vector.im
|
||||||
|
- riot.im
|
||||||
""" % locals()
|
""" % locals()
|
||||||
|
|
||||||
def add_arguments(self, parser):
|
def add_arguments(self, parser):
|
||||||
|
@ -200,7 +200,11 @@ class Mailer(object):
|
|||||||
yield sendmail(
|
yield sendmail(
|
||||||
self.hs.config.email_smtp_host,
|
self.hs.config.email_smtp_host,
|
||||||
raw_from, raw_to, multipart_msg.as_string(),
|
raw_from, raw_to, multipart_msg.as_string(),
|
||||||
port=self.hs.config.email_smtp_port
|
port=self.hs.config.email_smtp_port,
|
||||||
|
requireAuthentication=self.hs.config.email_smtp_user is not None,
|
||||||
|
username=self.hs.config.email_smtp_user,
|
||||||
|
password=self.hs.config.email_smtp_pass,
|
||||||
|
requireTransportSecurity=self.hs.config.require_transport_security
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
@ -403,7 +403,7 @@ class ServerReplicationStreamProtocol(BaseReplicationStreamProtocol):
|
|||||||
def on_REMOVE_PUSHER(self, cmd):
|
def on_REMOVE_PUSHER(self, cmd):
|
||||||
self.streamer.on_remove_pusher(cmd.app_id, cmd.push_key, cmd.user_id)
|
self.streamer.on_remove_pusher(cmd.app_id, cmd.push_key, cmd.user_id)
|
||||||
|
|
||||||
def onINVALIDATE_CACHE(self, cmd):
|
def on_INVALIDATE_CACHE(self, cmd):
|
||||||
self.streamer.on_invalidate_cache(cmd.cache_func, cmd.keys)
|
self.streamer.on_invalidate_cache(cmd.cache_func, cmd.keys)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
Loading…
Reference in New Issue
Block a user