Skip to content
Snippets Groups Projects
Commit b08f76bd authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Fix ignored read-receipts

Don't ignore read-receipts which arrive in the same EDU as a read-receipt for
an old event.
parent bd07a35c
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ class ReceiptsHandler(BaseHandler): ...@@ -100,7 +100,7 @@ class ReceiptsHandler(BaseHandler):
if not res: if not res:
# res will be None if this read receipt is 'old' # res will be None if this read receipt is 'old'
defer.returnValue(False) continue
stream_id, max_persisted_id = res stream_id, max_persisted_id = res
...@@ -109,6 +109,10 @@ class ReceiptsHandler(BaseHandler): ...@@ -109,6 +109,10 @@ class ReceiptsHandler(BaseHandler):
if max_batch_id is None or max_persisted_id > max_batch_id: if max_batch_id is None or max_persisted_id > max_batch_id:
max_batch_id = max_persisted_id max_batch_id = max_persisted_id
if min_batch_id is None:
# no new receipts
defer.returnValue(False)
affected_room_ids = list(set([r["room_id"] for r in receipts])) affected_room_ids = list(set([r["room_id"] for r in receipts]))
with PreserveLoggingContext(): with PreserveLoggingContext():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment