summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-01-07 12:08:58 +0000
committerBrendan Abolivier <babolivier@matrix.org>2020-01-07 12:08:58 +0000
commitcd428a93e23e56347957a62ec3d6ca26d6e03a02 (patch)
tree250fcb3593a15e835e3cea1373894785323fd8a9 /synapse/storage
parentAdded the section 'Configuration' in /docs/turn-howto.md (#6614) (diff)
downloadsynapse-cd428a93e23e56347957a62ec3d6ca26d6e03a02.tar.xz
Fix conditions failing if min_depth = 0
This could result in Synapse not fetching prev_events for new events in the room if it has missed some events.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/data_stores/main/event_federation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/data_stores/main/event_federation.py b/synapse/storage/data_stores/main/event_federation.py
index 1f517e8fad..1d18f13801 100644
--- a/synapse/storage/data_stores/main/event_federation.py
+++ b/synapse/storage/data_stores/main/event_federation.py
@@ -506,7 +506,7 @@ class EventFederationStore(EventFederationWorkerStore):
     def _update_min_depth_for_room_txn(self, txn, room_id, depth):
         min_depth = self._get_min_depth_interaction(txn, room_id)
 
-        if min_depth and depth >= min_depth:
+        if min_depth is not None and depth >= min_depth:
             return
 
         self.db.simple_upsert_txn(