summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-05-30 10:51:09 +0100
committerGitHub <noreply@github.com>2022-05-30 10:51:09 +0100
commit248046187940372c23466cb395b46ed97ebda1ed (patch)
treeb596b260ad616bf76b08d4399655e61bc682ba82 /synapse/storage
parentRemove unused `contrib/experiments/cursesio.py` (#12910) (diff)
downloadsynapse-248046187940372c23466cb395b46ed97ebda1ed.tar.xz
Fix `get_metadata_for_events` (#12904)
This method was introduced in #12852. It is using the `state_key` column from
the `events` table, which is not (yet) reliable (see #11496).
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/state.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/state.py b/synapse/storage/databases/main/state.py
index ea5cbdac08..a07ad85582 100644
--- a/synapse/storage/databases/main/state.py
+++ b/synapse/storage/databases/main/state.py
@@ -167,8 +167,8 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
             )
 
             sql = f"""
-                SELECT e.event_id, e.room_id, e.type, e.state_key FROM events AS e
-                LEFT JOIN state_events USING (event_id)
+                SELECT e.event_id, e.room_id, e.type, se.state_key FROM events AS e
+                LEFT JOIN state_events se USING (event_id)
                 WHERE {clause}
             """