Fixup membership query

This commit is contained in:
Erik Johnston 2016-12-14 10:46:58 +00:00
parent bae1115e55
commit c3208e45c9

View File

@ -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