mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Preserve version string in user agent
This commit is contained in:
parent
8fc52bc56a
commit
b28c7da0a4
@ -26,7 +26,7 @@ class ServerConfig(Config):
|
||||
self.soft_file_limit = config["soft_file_limit"]
|
||||
self.daemonize = config.get("daemonize")
|
||||
self.print_pidfile = config.get("print_pidfile")
|
||||
self.user_agent_override = config.get("user_agent_override")
|
||||
self.user_agent_suffix = config.get("user_agent_suffix")
|
||||
self.use_frozen_dicts = config.get("use_frozen_dicts", True)
|
||||
|
||||
self.listeners = config.get("listeners", [])
|
||||
|
@ -67,9 +67,9 @@ class SimpleHttpClient(object):
|
||||
connectTimeout=15,
|
||||
contextFactory=hs.get_http_client_context_factory()
|
||||
)
|
||||
self.user_agent = hs.config.user_agent_override
|
||||
if self.user_agent is None:
|
||||
self.user_agent = hs.version_string
|
||||
self.user_agent = hs.version_string
|
||||
if hs.config.user_agent_suffix:
|
||||
self.user_agent += " - " + hs.config.user_agent_suffix
|
||||
|
||||
def request(self, method, uri, *args, **kwargs):
|
||||
# A small wrapper around self.agent.request() so we can easily attach
|
||||
|
Loading…
Reference in New Issue
Block a user