From 7af1d98df0cd855e3d4a9c82eeb3881f6c59def6 Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Wed, 3 Aug 2022 14:47:26 +0200 Subject: Update synapse/storage/databases/main/deviceinbox.py Co-authored-by: Erik Johnston --- synapse/storage/databases/main/deviceinbox.py | 2 ++ 1 file changed, 2 insertions(+) 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 ( -- cgit 1.4.1