summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathieu Velten <mathieuv@matrix.org>2022-08-03 14:47:26 +0200
committerGitHub <noreply@github.com>2022-08-03 14:47:26 +0200
commit7af1d98df0cd855e3d4a9c82eeb3881f6c59def6 (patch)
treec87e9f5d7fac327b4a6aa96fd8ab6475a435d9e5
parentUse org.matrix.unstable prefix (diff)
downloadsynapse-github/mv/sync-to-device-limit.tar.xz
Update synapse/storage/databases/main/deviceinbox.py github/mv/sync-to-device-limit mv/sync-to-device-limit
Co-authored-by: Erik Johnston <erik@matrix.org>
-rw-r--r--synapse/storage/databases/main/deviceinbox.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/deviceinbox.py b/synapse/storage/databases/main/deviceinbox.py
index bab52ab389..dca71e5b4a 100644
--- a/synapse/storage/databases/main/deviceinbox.py
+++ b/synapse/storage/databases/main/deviceinbox.py
@@ -219,6 +219,8 @@ class DeviceInboxWorkerStore(SQLBaseStore):
                   same device should pass this value as 'from_stream_id'.
         """
         if limit == 0:
+            # We return the from token so that if a sync later on asks for
+            # non-zero number of to-device messages we won't have dropped any.
             return [], from_stream_id
 
         (