diff --git a/synapse/storage/databases/main/events_worker.py b/synapse/storage/databases/main/events_worker.py index 05a05c3cbe..7ddc279508 100644 --- a/synapse/storage/databases/main/events_worker.py +++ b/synapse/storage/databases/main/events_worker.py @@ -822,7 +822,7 @@ class EventsWorkerStore(SQLBaseStore): rej.reason FROM events AS e JOIN event_json AS ej USING (event_id) - LEFT JOIN rooms r USING (room_id) + LEFT JOIN rooms r ON r.room_id = e.room_id LEFT JOIN rejections as rej USING (event_id) WHERE """