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:
parent
bd07a35c29
commit
b08f76bd23
|
@ -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):
|
||||||
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():
|
||||||
|
|
Loading…
Reference in New Issue