summary refs log tree commit diff
path: root/synapse/storage/databases
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r--synapse/storage/databases/main/events_forward_extremities.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/events_forward_extremities.py b/synapse/storage/databases/main/events_forward_extremities.py
index 68b64838bb..0ac1da9c35 100644
--- a/synapse/storage/databases/main/events_forward_extremities.py
+++ b/synapse/storage/databases/main/events_forward_extremities.py
@@ -89,7 +89,7 @@ class EventForwardExtremitiesStore(SQLBaseStore):
                 SELECT event_id, state_group, depth, received_ts
                 FROM event_forward_extremities
                 INNER JOIN event_to_state_groups USING (event_id)
-                INNER JOIN events INNER JOIN USING (event_id)
+                INNER JOIN events USING (room_id, event_id)
                 WHERE room_id = ?
             """