diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-05-24 10:31:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 10:31:43 +0100 |
commit | 6abcb5d22d6f0580f6a0da40761750c4d643e5aa (patch) | |
tree | dc14eca4295bac6480da9d30cb95b40917bb6674 /synapse/config | |
parent | Merge pull request #3272 from matrix-org/rav/localpart_in_consent_uri (diff) | |
parent | Allow overriding the server_notices user's avatar (diff) | |
download | synapse-6abcb5d22d6f0580f6a0da40761750c4d643e5aa.tar.xz |
Merge pull request #3273 from matrix-org/rav/server_notices_avatar_url
Allow overriding the server_notices user's avatar
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/server_notices_config.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/synapse/config/server_notices_config.py b/synapse/config/server_notices_config.py index ccef8d2ec5..be1d1f762c 100644 --- a/synapse/config/server_notices_config.py +++ b/synapse/config/server_notices_config.py @@ -26,12 +26,13 @@ DEFAULT_CONFIG = """\ # setting, which defines the id of the user which will be used to send the # notices. # -# It's also possible to override the room name, or the display name of the -# "notices" user. +# It's also possible to override the room name, the display name of the +# "notices" user, and the avatar for the user. # # server_notices: # system_mxid_localpart: notices # system_mxid_display_name: "Server Notices" +# system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ" # room_name: "Server Notices" """ @@ -48,6 +49,10 @@ class ServerNoticesConfig(Config): The display name to use for the server notices user. None if server notices are not enabled. + server_notices_mxid_avatar_url (str|None): + The display name to use for the server notices user. + None if server notices are not enabled. + server_notices_room_name (str|None): The name to use for the server notices room. None if server notices are not enabled. @@ -56,6 +61,7 @@ class ServerNoticesConfig(Config): super(ServerNoticesConfig, self).__init__() self.server_notices_mxid = None self.server_notices_mxid_display_name = None + self.server_notices_mxid_avatar_url = None self.server_notices_room_name = None def read_config(self, config): @@ -68,7 +74,10 @@ class ServerNoticesConfig(Config): mxid_localpart, self.server_name, ).to_string() self.server_notices_mxid_display_name = c.get( - 'system_mxid_display_name', 'Server Notices', + 'system_mxid_display_name', None, + ) + self.server_notices_mxid_avatar_url = c.get( + 'system_mxid_avatar_url', None, ) # todo: i18n self.server_notices_room_name = c.get('room_name', "Server Notices") |