Update synapse/storage/databases/main/deviceinbox.py

Co-authored-by: Erik Johnston <erik@matrix.org>
This commit is contained in:
Mathieu Velten 2022-08-03 14:47:26 +02:00 committed by GitHub
parent 4cc2f3e990
commit 7af1d98df0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
(