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/roommember.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/roommember.py')
-rw-r--r-- | synapse/storage/roommember.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index d662d1cfc0..6a861943a2 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -645,8 +645,9 @@ class RoomMemberStore(RoomMemberWorkerStore): def add_membership_profile_txn(txn): sql = (""" - SELECT stream_ordering, event_id, events.room_id, content + SELECT stream_ordering, event_id, events.room_id, event_json.json FROM events + INNER JOIN event_json USING (event_id) INNER JOIN room_memberships USING (event_id) WHERE ? <= stream_ordering AND stream_ordering < ? AND type = 'm.room.member' @@ -667,7 +668,8 @@ class RoomMemberStore(RoomMemberWorkerStore): event_id = row["event_id"] room_id = row["room_id"] try: - content = json.loads(row["content"]) + event_json = json.loads(row["json"]) + content = event_json['content'] except Exception: continue |