summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorschmop <lars.richard@rocketmail.com>2022-11-24 11:49:04 +0100
committerGitHub <noreply@github.com>2022-11-24 10:49:04 +0000
commitc2e06c36d4ac2aef9de1a192cdcf9964415d09d2 (patch)
treefe0649f325a31b3527ec606d2206b5a2de032a89 /synapse/storage
parentImplement message forward pagination from start when no from is given, fixes ... (diff)
downloadsynapse-c2e06c36d4ac2aef9de1a192cdcf9964415d09d2.tar.xz
Fix crash admin media list api when info is None (#14537)
Fixes https://github.com/matrix-org/synapse/issues/14536
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/room.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py
index 4fbaefad73..52ad947c6c 100644
--- a/synapse/storage/databases/main/room.py
+++ b/synapse/storage/databases/main/room.py
@@ -912,7 +912,11 @@ class RoomWorkerStore(CacheInvalidationWorkerStore):
                 event_json = db_to_json(content_json)
                 content = event_json["content"]
                 content_url = content.get("url")
-                thumbnail_url = content.get("info", {}).get("thumbnail_url")
+                info = content.get("info")
+                if isinstance(info, dict):
+                    thumbnail_url = info.get("thumbnail_url")
+                else:
+                    thumbnail_url = None
 
                 for url in (content_url, thumbnail_url):
                     if not url: