mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-15 14:10:12 -04:00
Fix URL previewer user agent to fix Twitter previews
This commit is contained in:
parent
c4710fb8cf
commit
55d926999c
2 changed files with 3 additions and 13 deletions
|
@ -232,6 +232,7 @@ class SimpleHttpClient:
|
|||
ip_blacklist=None,
|
||||
http_proxy=None,
|
||||
https_proxy=None,
|
||||
user_agent=None,
|
||||
):
|
||||
"""
|
||||
Args:
|
||||
|
@ -250,7 +251,7 @@ class SimpleHttpClient:
|
|||
self._ip_blacklist = ip_blacklist
|
||||
self._extra_treq_args = treq_args
|
||||
|
||||
self.user_agent = hs.version_string
|
||||
self.user_agent = user_agent or hs.version_string
|
||||
self.clock = hs.get_clock()
|
||||
if hs.config.user_agent_suffix:
|
||||
self.user_agent = "%s %s" % (self.user_agent, hs.config.user_agent_suffix)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue