diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-12-02 22:42:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 22:42:58 +0000 |
commit | 5640992d176a499204a0756b1677c9b1575b0a49 (patch) | |
tree | ef3c2d1f709ba1ad9c236a6cef8b7ab758ed49ee /synapse/storage/databases/main/roommember.py | |
parent | Comments on the /sync tentacles (#11494) (diff) | |
download | synapse-5640992d176a499204a0756b1677c9b1575b0a49.tar.xz |
Disambiguate queries on `state_key` (#11497)
We're going to add a `state_key` column to the `events` table, so we need to add some disambiguation to queries which use it.
Diffstat (limited to 'synapse/storage/databases/main/roommember.py')
-rw-r--r-- | synapse/storage/databases/main/roommember.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index 033a9831d6..6b2a8d06a6 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -476,7 +476,7 @@ class RoomMemberWorkerStore(EventsWorkerStore): INNER JOIN events AS e USING (room_id, event_id) WHERE c.type = 'm.room.member' - AND state_key = ? + AND c.state_key = ? AND c.membership = ? """ else: @@ -487,7 +487,7 @@ class RoomMemberWorkerStore(EventsWorkerStore): INNER JOIN events AS e USING (room_id, event_id) WHERE c.type = 'm.room.member' - AND state_key = ? + AND c.state_key = ? AND m.membership = ? """ |