summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-03-29 23:05:33 +0100
committerRichard van der Hoff <richard@matrix.org>2018-03-29 23:17:12 +0100
commit2fe3f848b92ee9493a724935167fad84678a7eb2 (patch)
treef826f14cef84cc40f5921ae5844468274d1e299a /synapse/storage/roommember.py
parentMerge pull request #3043 from matrix-org/erikj/measure_state_group_creation (diff)
downloadsynapse-2fe3f848b92ee9493a724935167fad84678a7eb2.tar.xz
Remove uses of events.content
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py6
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