Fix ignored read-receipts

Don't ignore read-receipts which arrive in the same EDU as a read-receipt for
an old event.
This commit is contained in:
Richard van der Hoff 2016-12-08 12:13:01 +00:00
parent bd07a35c29
commit b08f76bd23
1 changed files with 5 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class ReceiptsHandler(BaseHandler):
if not res:
# res will be None if this read receipt is 'old'
defer.returnValue(False)
continue
stream_id, max_persisted_id = res
@ -109,6 +109,10 @@ class ReceiptsHandler(BaseHandler):
if max_batch_id is None or max_persisted_id > max_batch_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]))
with PreserveLoggingContext():