1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/transactions.py b/synapse/storage/databases/main/transactions.py
index 67655fc215..b3250084c5 100644
--- a/synapse/storage/databases/main/transactions.py
+++ b/synapse/storage/databases/main/transactions.py
@@ -411,7 +411,7 @@ class TransactionWorkerStore(CacheInvalidationWorkerStore):
JOIN events USING (stream_ordering)
WHERE destination = ?
AND stream_ordering > ?
- AND room_id != '!OGEhHVWSdvArJzumhm:matrix.org'
+ AND destination_rooms.room_id != '!OGEhHVWSdvArJzumhm:matrix.org'
ORDER BY stream_ordering
LIMIT 50
"""
|