Browse Source

Only send catch up events if they're the latest in the room

Erik Johnston 3 years ago
parent
commit
2e09e2163e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      synapse/storage/databases/main/transactions.py

+ 2 - 1
synapse/storage/databases/main/transactions.py

@@ -428,7 +428,8 @@ class TransactionStore(TransactionWorkerStore):
     ) -> List[str]:
         q = """
                 SELECT event_id FROM destination_rooms
-                 JOIN events USING (stream_ordering)
+                 INNER JOIN events USING (stream_ordering)
+                 INNER JOIN event_forward_extremities USING (event_id)
                 WHERE destination = ?
                   AND stream_ordering > ?
                 ORDER BY stream_ordering