0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2025-01-19 01:51:55 +01:00

Handle thumbnail urls

This commit is contained in:
Erik Johnston 2017-06-19 17:47:55 +01:00
parent b8b936a6ea
commit 385dcb7c60

View file

@ -562,10 +562,12 @@ class RoomStore(SQLBaseStore):
next_token = stream_ordering
content = json.loads(content_json)
url = content.get("url")
content_url = content.get("url")
thumbnail_url = content.get("info", {}).get("thumbnail_url")
for url in (content_url, thumbnail_url):
if not url:
continue
matches = mxc_re.match(url)
if matches:
hostname = matches.group(1)