diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-04-05 15:02:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 15:02:17 +0100 |
commit | 22284a6f65ae8094cc3ebea5107897e8cddeaa03 (patch) | |
tree | 57c983615ea322809b48376524a73837c17582a0 /synapse/storage/room.py | |
parent | Merge pull request #3063 from matrix-org/jcgruenhage/cache_settings_stats (diff) | |
parent | Remove uses of events.content (diff) | |
download | synapse-22284a6f65ae8094cc3ebea5107897e8cddeaa03.tar.xz |
Merge pull request #3060 from matrix-org/rav/kill_event_content
Remove uses of events.content
Diffstat (limited to 'synapse/storage/room.py')
-rw-r--r-- | synapse/storage/room.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 908551d6d9..740c036975 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -594,7 +594,8 @@ class RoomStore(RoomWorkerStore, SearchStore): while next_token: sql = """ - SELECT stream_ordering, content FROM events + SELECT stream_ordering, json FROM events + JOIN event_json USING (event_id) WHERE room_id = ? AND stream_ordering < ? AND contains_url = ? AND outlier = ? @@ -606,8 +607,8 @@ class RoomStore(RoomWorkerStore, SearchStore): next_token = None for stream_ordering, content_json in txn: next_token = stream_ordering - content = json.loads(content_json) - + event_json = json.loads(content_json) + content = event_json["content"] content_url = content.get("url") thumbnail_url = content.get("info", {}).get("thumbnail_url") |