mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-29 15:39:00 +03:00
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
1 changed files with 5 additions and 1 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue