summary refs log tree commit diff
path: root/synapse/storage/roommember.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-12-14 10:46:58 +0000
committerErik Johnston <erik@matrix.org>2016-12-14 10:46:58 +0000
commitc3208e45c956dc5e35fbfc94bd351c86b392b263 (patch)
tree7430e9ff2f6af2395cba85c6acf1677aaf7fa5ea /synapse/storage/roommember.py
parentUpdate changelog (diff)
downloadsynapse-c3208e45c956dc5e35fbfc94bd351c86b392b263.tar.xz
Fixup membership query
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r--synapse/storage/roommember.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index 63e8c32903..946d5a81cc 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -483,9 +483,9 @@ class RoomMemberStore(SQLBaseStore):
 
         def add_membership_profile_txn(txn):
             sql = ("""
-                SELECT stream_ordering, event_id, room_id, content
+                SELECT stream_ordering, event_id, events.room_id, content
                 FROM events
-                INNER JOIN room_memberships USING (room_id, event_id)
+                INNER JOIN room_memberships USING (event_id)
                 WHERE ? <= stream_ordering AND stream_ordering < ?
                 AND type = 'm.room.member'
                 ORDER BY stream_ordering DESC